6 Commits

Author SHA1 Message Date
Christophe Bliard baeb6e733c Fix default section missing overview visibility area
https://community.openproject.org/wp/72671

The default custom field section was created with an empty
`display_representation` (`{}`), causing project attributes to not appear
on the project overview page even when enabled by users.

New sections correctly receive the default overview visibility area
(`"sidebar"`), but the default section was not initialized with it.

Add a migration to backfill existing default sections that have an
empty `display_representation` with the default value
`{ overview: "sidebar" }`.
2026-03-04 17:52:10 +01:00
Henriette Darge caa609d34c [61445] Configure project attribute sections to be shown as widgets on the project overview page (#20899)
* Show project attributes as sections in project overview

* Introduce a column "shown_in" for CustomFieldSection which defines whether the section shall be shown in the sidebar or the main section of the project overview

* Show only those attributes in main section that are configured to be shown there. Same for the sidebar.

* Update project attribute sections after editing them

* Write a test for the new positioning behavior of project attribute sections

* Rename "shown_in" with "display_representation" and make it a hash

* Provide proper default when creating a new section

* Enforce project attribute widgets to be in a new line and wrap properly

* Hide logic for moivng sections to the main area behind the feature flag

* Rename "main section" to "main area"

* Extract custom margins into normal sass

* Rename "side-panel" to "side panel"

* Update test to changed wording
2025-11-19 08:01:42 +01:00
Alexander Brandon Coles d17da65477 Freeze string literals in app/models
rubocop -A --only Style/FrozenStringLiteralComment,Layout/EmptyLineAfterMagicComment,Style/RedundantFreeze app/models
2025-07-22 18:26:13 +01:00
Ivan Kuchin 4911b8a149 remove years from copyrights (except for COPYRIGHT file) 2024-07-31 15:02:49 +02:00
Dombi Attila b1444429be Avoid N+1 queries on the ProjectCustomFieldSections
Additionally moving the custom_fields relation from the CustomFieldSection
to the ProjectCustomFieldSection. This is required, because we have to specify the
custom_fields relation to include ProjectCustomField objects only.
Otherwise the nested include query in the ProjectCustomFieldsController does not work.
2024-03-19 21:58:48 +02:00
Jonas Jabari 029c655b7f refactored datamodeling, reuse custom field forms in new project attribute context 2023-11-24 14:51:25 +01:00