Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Update toolbar title after query changes

Henriette Dinger7ee2ee731a68
diff --git a/frontend/src/app/modules/work_packages/routing/partitioned-query-space-page/partitioned-query-space-page.component.ts b/frontend/src/app/modules/work_packages/routing/partitioned-query-space-page/partitioned-query-space-page.component.ts
index c1074a7bb40..3c599bf122f 100644
--- a/frontend/src/app/modules/work_packages/routing/partitioned-query-space-page/partitioned-query-space-page.component.ts
+++ b/frontend/src/app/modules/work_packages/routing/partitioned-query-space-page/partitioned-query-space-page.component.ts
@@ -107,6 +107,7 @@ export class PartitionedQuerySpacePageComponent extends WorkPackagesViewBase imp
const toState = transition.to();
this.hasQueryProps = !!params.query_props;
this.setPartition(toState);
+ this.cdRef.detectChanges();
});
// If the query was loaded, reload invisibly
diff --git a/spec/features/work_packages/table/queries/query_name_inline_edit_spec.rb b/spec/features/work_packages/table/queries/query_name_inline_edit_spec.rb
index 1da76c2660f..95f32604812 100644
--- a/spec/features/work_packages/table/queries/query_name_inline_edit_spec.rb
+++ b/spec/features/work_packages/table/queries/query_name_inline_edit_spec.rb
@@ -62,6 +62,8 @@ describe 'Query name inline edit', js: true do
end
let(:wp_table) { Pages::WorkPackagesTable.new(project) }
+ let(:modal) { ::Components::WorkPackages::TableConfigurationModal.new }
+ let(:columns) { ::Components::WorkPackages::Columns.new }
let(:filters) { ::Components::WorkPackages::Filters.new }
let(:query_title) { ::Components::WorkPackages::QueryTitle.new }
@@ -87,6 +89,7 @@ describe 'Query name inline edit', js: true do
# Expect unchanged
query_title.expect_not_changed
+
assignee_query.reload
expect(assignee_query.filters.count).to eq(1)
expect(assignee_query.filters.first.name).to eq :status_id
@@ -114,4 +117,18 @@ describe 'Query name inline edit', js: true do
assignee_query.reload
expect(assignee_query.name).to eq 'Some other name'
end
+
+ it 'shows the save icon when changing the columns (Regression #32835)' do
+ wp_table.expect_work_package_listed work_package
+ query_title.expect_not_changed
+
+ modal.open!
+ modal.switch_to 'Columns'
+
+ columns.assume_opened
+ columns.uncheck_all save_changes: false
+ columns.add 'Subject', save_changes: true
+
+ query_title.expect_changed
+ end
end