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

Set default highlighting attributes to the expected ones (#13427)

Oliver Günther021dfa19c4bf
diff --git a/config/constants/settings/definition.rb b/config/constants/settings/definition.rb
index 03eade50e69..20c750c1fbc 100644
--- a/config/constants/settings/definition.rb
+++ b/config/constants/settings/definition.rb
@@ -1037,7 +1037,7 @@ module Settings
default: 10
},
work_package_list_default_highlighted_attributes: {
- default: [],
+ default: ["status", "priority", "due_date"],
allowed: -> {
Query.available_columns(nil).select(&:highlightable).map(&:name).map(&:to_s)
}
diff --git a/frontend/src/app/core/setup/globals/global-listeners/settings.ts b/frontend/src/app/core/setup/globals/global-listeners/settings.ts
index 4ad1be516de..11c3cfd5c4e 100644
--- a/frontend/src/app/core/setup/globals/global-listeners/settings.ts
+++ b/frontend/src/app/core/setup/globals/global-listeners/settings.ts
@@ -106,13 +106,6 @@ export function listenToSettingChanges() {
jQuery('.settings--highlighted-attributes').toggle(highlightingMode === 'inline');
});
- /** Initialize highlighted attributes checkboxes. If none is selected, it means we want them all. So let's
- * show them all as selected.
- * On submitting the form, we remove all checkboxes before sending to communicate, we actually want all and not
- * only the selected. */
- if (jQuery(".settings--highlighted-attributes input[type='checkbox']:checked").length === 0) {
- jQuery(".settings--highlighted-attributes input[type='checkbox']").prop('checked', true);
- }
jQuery('#tab-content-work_packages form').submit(() => {
const availableAttributes = jQuery(".settings--highlighted-attributes input[type='checkbox']");
const selectedAttributes = jQuery(".settings--highlighted-attributes input[type='checkbox']:checked");