Skip to content

Commit f3fa414

Browse files
authored
Merge pull request #18570 from opf/merge-release/15.5-20250408034155
Merge release/15.5 into dev
2 parents ee26233 + c8cb132 commit f3fa414

File tree

8 files changed

+86
-8
lines changed

8 files changed

+86
-8
lines changed

app/controllers/workflows_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,6 @@ def eligible_roles
152152
def permitted_status_params
153153
params["status"]
154154
.to_unsafe_h
155-
.select { |key, value| /\A\d+\z/.match?(key) && /\A\d+\z/.match?(value) }
155+
.select { |key, value| /\A\d+\z/.match?(key) && value.keys.all? { /\A\d+\z/.match?(it) } }
156156
end
157157
end

docs/user-guide/work-packages/exporting/README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,12 +181,16 @@ If you select **Generate PDF**, a modal will open, where you can adjust the foll
181181
- If *Attributes and description* template is selected, the project name will be suggested for the footer. This text will be placed at the center of the footer.
182182
- If *Contract* template is selected, the work package subject will be suggested as the footer text. This text will be placed at the right corner of the footer.
183183

184-
184+
- **Page orientation**, which allows selecting *Portrait* or *Landscape* layout of the pages in the PDF.
185185

186186
![PDF generation modal for export of single work packages in OpenProject](openproject_user_guide_work_package_export_pdf_modal.png)
187187

188188
Click the **Download** button to generate the PDF export.
189189

190+
> [!NOTE]
191+
>
192+
> Layout of the PDF export follows the [work package configuration form](../../../system-admin-guide/manage-work-packages/work-package-types/#work-package-form-configuration-enterprise-add-on) defined for specific work package types.
193+
190194
![Example of a single work package PDF export in OpenProject](openproject-user-guide-single-pdf-export.png)
191195

192196
### Export single work package in Atom format
Loading

frontend/src/app/features/work-packages/components/wp-fast-table/builders/relations/relation-row-builder.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ relationGroupClass(from.id!),
9797
columnId:string,
9898
):void {
9999
const relationLabel = document.createElement('span');
100-
relationLabel.classList.add('relation-row--type-label');
100+
relationLabel.classList.add('relation-row--type-label', 'badge');
101101
relationLabel.textContent = typeLabel;
102102

103103
jRow.find(`.${relationCellClassName}`).empty();

frontend/src/global_styles/content/work_packages/_table_relations.sass

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,8 @@ body
3434

3535
// Style the relation label
3636
.relation-row--type-label
37-
background: white
38-
padding: 2px
39-
border: 1px solid var(--gray)
4037
border-radius: 5px
4138
margin-right: 5px
42-
font-size: 0.7rem
4339

4440
.relation-row--type
4541
@include unset-button-styles

spec/controllers/workflows_controller_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@
245245
end
246246

247247
describe "#update" do
248-
let(:status_params) { { "1" => "2" } }
248+
let(:status_params) { { "1" => { "2" => ["always"] } } }
249249
let(:service) do
250250
service = instance_double(Workflows::BulkUpdateService)
251251

spec/features/workflows/edit_spec.rb

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# frozen_string_literal: true
2+
3+
# -- copyright
4+
# OpenProject is an open source project management software.
5+
# Copyright (C) the OpenProject GmbH
6+
#
7+
# This program is free software; you can redistribute it and/or
8+
# modify it under the terms of the GNU General Public License version 3.
9+
#
10+
# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
11+
# Copyright (C) 2006-2013 Jean-Philippe Lang
12+
# Copyright (C) 2010-2013 the ChiliProject Team
13+
#
14+
# This program is free software; you can redistribute it and/or
15+
# modify it under the terms of the GNU General Public License
16+
# as published by the Free Software Foundation; either version 2
17+
# of the License, or (at your option) any later version.
18+
#
19+
# This program is distributed in the hope that it will be useful,
20+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
21+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22+
# GNU General Public License for more details.
23+
#
24+
# You should have received a copy of the GNU General Public License
25+
# along with this program; if not, write to the Free Software
26+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
27+
#
28+
# See COPYRIGHT and LICENSE files for more details.
29+
# ++
30+
31+
require "spec_helper"
32+
33+
RSpec.describe "Workflow edit" do
34+
include Toasts::Expectations
35+
36+
let(:role) { create(:project_role) }
37+
let(:type) { create(:type) }
38+
let(:admin) { create(:admin) }
39+
let(:statuses) { (1..3).map { create(:status) } }
40+
let!(:workflow) do
41+
create(:workflow, role_id: role.id,
42+
type_id: type.id,
43+
old_status_id: statuses[0].id,
44+
new_status_id: statuses[1].id,
45+
author: false,
46+
assignee: false)
47+
end
48+
49+
current_user { admin }
50+
51+
before do
52+
visit url_for(controller: "/workflows", action: :edit)
53+
end
54+
55+
it "allows adding another workflow" do
56+
click_button "Edit"
57+
58+
check "status_#{statuses[1].id}_#{statuses[2].id}_"
59+
60+
click_button "Save"
61+
62+
expect_flash(message: "Successful update.")
63+
64+
expect(page)
65+
.to have_field "status_#{statuses[0].id}_#{statuses[1].id}_", checked: true
66+
expect(page)
67+
.to have_field "status_#{statuses[1].id}_#{statuses[2].id}_", checked: true
68+
69+
expect(page)
70+
.to have_field "status_#{statuses[0].id}_#{statuses[2].id}_", checked: false
71+
expect(page)
72+
.to have_field "status_#{statuses[1].id}_#{statuses[0].id}_", checked: false
73+
expect(page)
74+
.to have_field "status_#{statuses[2].id}_#{statuses[0].id}_", checked: false
75+
expect(page)
76+
.to have_field "status_#{statuses[2].id}_#{statuses[1].id}_", checked: false
77+
end
78+
end

0 commit comments

Comments
 (0)