Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/release/15.1' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
ulferts committed Dec 5, 2024
2 parents 6a29de9 + 033e5cb commit 847fce5
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 12 deletions.
6 changes: 3 additions & 3 deletions app/controllers/types_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def update

call.on_failure do |result|
flash[:error] = result.errors.full_messages.join("\n")
render_edit_tab(@type)
render_edit_tab(@type, status: :unprocessable_entity)
end
end
end
Expand Down Expand Up @@ -139,12 +139,12 @@ def redirect_to_type_tab_path(type, notice)
notice:)
end

def render_edit_tab(type)
def render_edit_tab(type, status: :ok)
@tab = params[:tab]
@projects = Project.all
@type = type

render action: :edit, status: :unprocessable_entity
render action: :edit, status:
end

def show_local_breadcrumb
Expand Down
9 changes: 9 additions & 0 deletions docs/user-guide/projects/project-lists/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,15 @@ By selecting *Overall activity* you can open a view in which all the latest glob

![overall activity meeting filter](actvity-global-filter.png)

### Zen mode

In order to work on project lists uninterrupted, you can use the Zen mode. To activate it, select the menu in the far right corner (three dots) and click **Zen mode**. Once the Zen mode is selected, the header and the sidebar will be hidden.

![Select zen mode in OpenProject project lists](openproject_project_list_select_zen_mode.png)




## Favorite project lists

You can mark project lists as favorites, both shared and private, but not the static ones. To mark a project list as favorite click the star icon in the top right corner.
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 4 additions & 1 deletion docs/user-guide/work-packages/edit-work-package/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ keywords: edit work packages

To edit a work package, double-click a work package row in [table view](../../work-packages/work-package-views/#table-view) or open the [split screen view](../../work-packages/work-package-views/#split-screen-view) to see the details.

In the work package details, you can click in any field to update it, e.g. change the description, status, priority, assignee, or add a comment.
In the work package details, you can click in any field to update it, e.g. change the description, status, priority, assignee, or add a comment.

> [!TIP]
> You can also insert a page break into the description field if you intend to [export a work package in PDF format](../exporting/#pdf-report) and want to the description to be displayed on separate pages of a PDF report.
To save changes in the description, click the **checkmark** icon.

Expand Down
5 changes: 4 additions & 1 deletion docs/user-guide/work-packages/exporting/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ OpenProject has multiple file format options for exporting work packages, includ

### PDF export

OpenProject has multiple options for exporting work packages in PDF format. These include table, report and Gantt chart.
OpenProject has multiple options for exporting work packages in PDF format. These include table, report and Gantt chart.

#### PDF Table

Expand All @@ -60,6 +60,9 @@ For each work package, a table of attributes is included, where attributes corre

The table of attributes is followed by the work package description and, if necessary, custom long text fields, which support [embedded work package and project attributes](../../wysiwyg/#attributes).

> [!TIP]
> If you used page breaks in work package descriptions, contents will be split into separate pages accordingly.
> [!NOTE]
> Embedding of rich text, e.g. descriptions of other work packages, is currently not supported.
Expand Down
25 changes: 20 additions & 5 deletions spec/controllers/types_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@
get "edit", params: { id: type.id, tab: :settings }
end

it { expect(response).to have_http_status(:unprocessable_entity) }
it { expect(response).to have_http_status(:ok) }
it { expect(response).to render_template "edit" }
it { expect(response).to render_template "types/form/_settings" }
it { expect(response.body).to have_css "input[@name='type[name]'][@value='My type']" }
Expand All @@ -233,7 +233,7 @@
get "edit", params: { id: type.id, tab: :projects }
end

it { expect(response).to have_http_status(:unprocessable_entity) }
it { expect(response).to have_http_status(:ok) }
it { expect(response).to render_template "edit" }
it { expect(response).to render_template "types/form/_projects" }

Expand All @@ -242,7 +242,7 @@
}
end

describe "POST update" do
describe "PATCH update" do
let(:project2) { create(:project) }
let(:type) do
create(:type, name: "My type",
Expand All @@ -258,7 +258,7 @@
end

before do
put :update, params:
patch :update, params:
end

it { expect(response).to be_redirect }
Expand All @@ -274,6 +274,21 @@
end
end

describe "WITH the name being erroneously blank" do
let(:params) do
{ "id" => type.id,
"type" => { name: "" },
"tab" => "settings" }
end

before do
patch :update, params:
end

it { expect(response).to have_http_status(:unprocessable_entity) }
it { expect(response).to render_template "edit" }
end

describe "WITH projects removed" do
let(:params) do
{ "id" => type.id,
Expand All @@ -282,7 +297,7 @@
end

before do
put :update, params:
patch :update, params:
end

it { expect(response).to be_redirect }
Expand Down
4 changes: 2 additions & 2 deletions spec/features/work_packages/update_ancestors_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -174,14 +174,14 @@ def expect_totals(parent, descendants)
context_menu = wp_table.open_context_menu_for(second_child)
context_menu.choose(I18n.t("js.relation_buttons.hierarchy_outdent"))
wp_table.expect_and_dismiss_toaster message: "Successful update"
wait_for_network_idle

expect_totals(parent, [child])

context_menu = wp_table.open_context_menu_for(second_child)
context_menu.choose(I18n.t("js.relation_buttons.hierarchy_indent"))
wait_for_network_idle

wp_table.expect_and_dismiss_toaster message: "Successful update"
wait_for_network_idle

expect_totals(parent, [child, second_child])
end
Expand Down
2 changes: 2 additions & 0 deletions spec/support/pages/projects/index.rb
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,8 @@ def set_columns(*columns)
within "dialog" do
click_on "Apply"
end

wait_for_network_idle
end

def expect_no_config_columns(*columns)
Expand Down

0 comments on commit 847fce5

Please sign in to comment.