Commit Graph

1678 Commits

Author SHA1 Message Date
OpenProject Actions CI b2f72fd486 Merge branch 'release/17.5' into dev 2026-05-30 04:49:04 +00:00
Tomas Hykel baf9f7f2c9 fix: Stability fixes for the identifier conversion procedure 2026-05-29 13:09:26 +02:00
OpenProject Actions CI 3e02e2863f Merge branch 'release/17.5' into dev 2026-05-28 12:18:34 +00:00
Tomas Hykel 7e3fbfbb65 Revert "increase to 10 chars for good measure"
This reverts commit 941230671c.
2026-05-28 13:23:51 +02:00
Tomas Hykel accd7a0628 fix an unrelated test 2026-05-28 13:22:08 +02:00
Tomas Hykel 941230671c increase to 10 chars for good measure 2026-05-28 13:21:05 +02:00
Tomas Hykel a8005ff6d4 just use project-{random_suffix} 2026-05-28 13:20:03 +02:00
Tomas Hykel 5343c1139d use a random suffix instead 2026-05-28 13:07:05 +02:00
Tomas Hykel ccc3a004d6 fix(db): Conversion stuck and not resumable for users after validation error during conversion job (WP #75170) 2026-05-28 12:52:24 +02:00
OpenProject Actions CI 49b802ca02 Merge branch 'release/17.5' into dev 2026-05-28 08:51:09 +00:00
Kabiru Mwenja 23d52fcf1c Drop semantic_work_package_ids flag annotations
The feature flag is gone on release/17.5 (PR #23324); the
`with_settings: { work_packages_identifier: ... }` annotation alone
is enough to pin classic vs semantic behaviour in each context.
2026-05-26 14:24:03 +03:00
Kabiru Mwenja 6e3068531f Write primary-key WP refs in auto-generated journal notes
The earlier write-time canonicalization stored the rendered
display_id ("#PROJ-7") in the journal note, which would rot under
project-identifier renames and leave dangling semantic strings if
semantic mode were rolled back. Restore the PK shape ("#42") and
let the formatter pipeline turn it into the user-facing identifier
at render time, where the resolver already handles both modes.

Both spec contexts now assert the same PK shape; the mode-specific
rendering of "#N" lives in the formatter specs.
2026-05-26 14:19:25 +03:00
Kabiru Mwenja 878048f8e8 Resolve WP labels across visibility boundaries in text macros
The macro preload was visibility-scoped — references to work packages the
recipient cannot see would fall through to the literal `#43` shape, even
when the same reference rendered as `DCP-1` for an author with full view
permission. Notification recipients saw misleading numeric ids for cross-
project references in journal notes.

Splits label resolution from link gating:

- `ResourceLinksMatcher.build_lookup` now does an unscoped fetch for the
  primary identifier and a separate visibility-scoped id pluck. The link
  handler reads `visible_to_current_user?` to decide between a navigable
  anchor and a plain-text label.
- `UpdateAncestorsService#set_journal_note` writes `#display_id` so new
  notes carry the semantic shape at the source; render-time resolution
  heals legacy `#N` content for users with view permission.

Tradeoff: a recipient without view permission now sees the WP's semantic
identifier (e.g. `DCP-1`) as plain text rather than `#43`. The reference's
existence was already disclosed by the stored journal text; the project
identifier is the only new piece of information surfaced, and is not
treated as a secret elsewhere in the system (URLs, exports, API).
2026-05-26 14:18:48 +03:00
Alexander Brandon Coles 1ba2dd2775 [#75314] Replace deprecated Pagy max_pages option
Pagy 43.4.3 deprecated `:max_pages` and recommends capping records
before pagination instead. Caps the combined array in `base_journals`.

https://community.openproject.org/wp/75314
2026-05-26 11:56:20 +02:00
Tomas Hykel 948fa43321 chore: Remove feature flag for project-based work package identifiers 2026-05-25 17:45:06 +02:00
Mir Bhatia 14b4228be7 Merge pull request #23283 from opf/bug/73494-role-not-created-properly-when-unselecting-all-permissions
[#73494] Role not created properly when unselecting all permissions
2026-05-21 15:36:01 +02:00
Tomas Hykel 1ce03faa03 feat: Improve progress reporting during identifier conversion 2026-05-20 20:27:43 +02:00
Jens Ulferts 0ceaa2617c Merge pull request #23181 from opf/code-maintenance/74768-remove-calculated_value_project_attribute-feature-flag
[#74768] Remove calculated_value_project_attribute feature flag
2026-05-20 16:09:46 +02:00
Mir Bhatia 9937d62cad Allow explicitly setting no permissions on role creation 2026-05-20 11:24:13 +02:00
Dombi Attila 93594ec0f2 Merge pull request #23127 from opf/code-maintenance/74402-centralize-move-action-in-controllers
[#74402] Centralize move action in controllers
2026-05-19 19:43:36 +03:00
Dombi Attila 3b0642db88 Implement ServiceResult#bind to allow chaining successful service call operations. 2026-05-19 18:58:28 +03:00
Ivan Kuchin b648341030 [#74768] Remove calculated_value_project_attribute feature flag
https://community.openproject.org/wp/74768
2026-05-19 17:42:42 +02:00
Pavel Balashou 5af7d211c8 [#74977] Modify friendly_id_slugs constraints.
https://community.openproject.org/wp/74977

Add NOT NULL to *sluggable_type* and fix NULL *scope* uniqueness in *friendly_id_slugs*

- Delete duplicate NULL *scope* rows, keeping the most recent per (slug, sluggable_type)
- Delete NULL *sluggable_type* rows before adding NOT NULL constraint
- Replace unique index on (slug, sluggable_type, scope) with NULLS NOT DISTINCT variant (requires Postgres 15+)

Why?

1. *sluggable_type* NOT NULL
  every slug must belong to a model (e.g. Post, User). A slug with no *sluggable_type* is orphaned and meaningless.
2. NULLS NOT DISTINCT in the unique constraint
  not treating every NULL *scope* as unique leads to duplicate records if *scope* is NULL which does not make sense
  and pollutes the table with unnecessary data
2026-05-19 11:14:41 +02:00
Tomas Hykel 506198d55d chore: Consolidate classic project ID generation 2026-05-18 14:15:20 +02:00
Tomas Hykel e07f2006f6 remove the dot/bang conversion 2026-05-17 15:25:00 +02:00
Tomas Hykel 4e5ae54077 Fix ClassicIdentifierSuggestionGenerator to reject all-numeric slugs 2026-05-17 15:16:05 +02:00
Tomas Hykel b606031356 TDD time! 2026-05-17 13:35:22 +02:00
Tom Hykel 93e2a2bef7 Merge pull request #22938 from opf/fix/semantic_conversion_patches_4
fix: Do not trigger notifications during project identifier migration
2026-05-13 14:27:38 +02:00
Behrokh Satarnejad d924c255cf [69524] Primerize Types form configuration page (#22854)
* Create the section component

* Create the form configuration component

* Create a controller

* change form template

* Use primer dialog for reset to defaults button

* show WP configuration modal while creating a related WPs table

* Fix the drag and drop functionality without save button

* Fix renaming functionality

* Use generic drag and drop in form configuration and move all client side action handling to server side

* Fix embedded query form configuration regressions

* Add data test selectors to all elements that we used for test

* update the current tests with the new implementations and design

* Add new tests for new controller of sections and rows

* WP quesry row should only have edit quesry action

* Update transformer spec regarding the new changes

* Fix the failing test in reset form configuration and some tests for actions

* Fix rubocop errors

* Fix eslint errors

* Add spec for removing a section

* Use condensed border boxes

* fix failing specs

* fix failing specs

* Switch the buttons in form configuration component

* Create the section at the top of the list

* Instead of using UUID, use the name of the group as the key

* Add missing check for EE for section actions

* Remove angular components

* Use action list instead of a border box for left side panel

* Reduce the margin between the right side panel and sub header, add some space to the query table left side, span to the whole available space

* Show validation errors while updating and creating a section

* Use a danger dialog for reset to default

* Add a confirmation for removing the section

* Align items in the row

* Use test_selector instead of data-test-selector

* Create move_action in rb file

* Create move_action in rb file

* Simplify section component

* Simplify form configuration component

* Remove dialog for rename and delete section on missing EE

* Create a component for inactive attribute list

* Create a separate component for reset dialog

* Remove EE feedback dialog

* Remove form partial which is not needed anymore

* Remove unused js strings

* Update using update_via_turbo

* Remove form configuration rows controller

* Create a blanksalte component

* Fix failing specs

* Fix failing specs

* Fix failing specs

* Remove unused translation strings

* Align form configuration section routes with actual create flow

* Change section to group

* Change section to group in services and controllers

* Change section to group in en.yml

* Fix rubocop errors

* Move the query group persistence assertion from the JS feature spec
to the synchronous form configuration groups controller spec.

* Reuse query service result in embedded query build

* Keep inactive attribute filter after turbo list refresh

* Extract form configuration group edit state into form model

* Fix the failing test

* Potential fix for pull request finding 'CodeQL / Potentially uninitialized local variable'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* Rename inactive attribute component inputs

* Refine reset dialog wording for form configuration

* Use direct Turbo action for adding attribute groups

* Reuse generic filter-list controller for inactive attributes

* Remove focus impelementation in ts

* Group form configuration Stimulus controllers under one namespace

* Use turbo request service in form configuration controller

* Clarify legacy group key normalization in form config contract

* Replace inactive attribute list wrapper via turbo stream

* Extract duplicate untitled group key generation into Type::FormGroup.next_untitled_key

* Auto-generate untitled group name on create instead of returning an error

* Avoid mixed return types in form config group create service

* Extract shared form configuration group service behavior into concern

* Fix spacing for the last group and italic font for the placeholder rows

* Replace Angular no-results component with Primer Banner on form configuration page

* Hide dropped element immediately to prevent flickering before Turbo Stream response

* Reload type before rendering create error to prevent duplicate groups

* Await service initialization before use to prevent potential race condition

* Replace sleep calls with deterministic waits in form configuration spec

* Handle malformed JSON and invalid query errors gracefully in form configuration update

* Make query group label a clickable button and empty group hint italic

---------

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2026-05-13 12:56:18 +02:00
Tomas Hykel 1d320fb544 fix: Do not trigger notifications during project identifier migration 2026-05-12 21:22:58 +02:00
Tom Hykel 3ff2481ab2 Merge pull request #23121 from opf/fix/project-copy-counter-bug
fix: Correctly handle semantic ID counter on project copy
2026-05-08 14:31:56 +02:00
Tomas Hykel ae3f4aa689 fix: Adjust save button behaviour in identifier settings 2026-05-07 23:37:05 +02:00
Tomas Hykel 53a557678f fix the test 2026-05-07 22:43:42 +02:00
Tomas Hykel 8e70767c5f fix: Correctly handle wp_sequence_counter on project copy 2026-05-07 22:12:27 +02:00
Oliver Günther d314c487d5 Use registry for associated journal objects, not hard coded map 2026-05-07 10:34:06 +02:00
Jan Sandbrink 6fed98298e Merge pull request #23080 from opf/core-health-validator
Move health validator to core
2026-05-07 08:13:45 +02:00
OpenProject Actions CI 0778811719 Merge branch 'release/17.4' into dev 2026-05-06 12:47:03 +00:00
Jan Sandbrink 704f96e6b9 Move health validator to core
This is part of making health reports available to other modules
than storages as well. The base classes are essentially free of relevant
references to the storages module and only contain the glue code necessary
to fill a health report properly.
2026-05-06 13:03:57 +02:00
Oliver Günther c660802146 Merge remote-tracking branch 'origin/release/17.3' into release/17.4 2026-05-06 09:19:25 +02:00
Kabiru Mwenja 8edab11953 Merge pull request #23016 from opf/bugfix/move-work-package-semantic-id-404
Resolve semantic work package id when moving a work package
2026-05-05 16:50:40 +03:00
Klaus Zanders a66bc91c63 Include all permission dependencies, add a factory for the role with the correct permissions 2026-05-04 11:15:43 +02:00
Klaus Zanders ba64d8ff56 Ensure that only roles with fitting permissions can be used as the role for the project creator 2026-05-04 10:20:24 +02:00
Kabiru Mwenja a54362020f Refresh in-memory identifier after WP move re-allocation
Project#reserve_semantic_id_block! rewrites work_packages.identifier
and sequence_number via a raw SQL UPDATE, leaving the in-memory
records with the nil identifier set by SetAttributesService when the
project changed. Callers that read the WP straight out of the
ServiceResult (HAL action links, the move-and-follow redirect in
WorkPackages::BulkJob#redirect_path) then saw an empty display_id and
fell back to numeric URLs. Reload after the bulk allocation so the
in-memory state matches the database.
2026-04-30 16:56:27 +03:00
OpenProject Actions CI 8c02bed77d Merge branch 'release/17.4' into dev 2026-04-29 04:40:04 +00:00
as-op 7bbeb3f3fa fix: newline after horizontal rule html in renderer, so the next line is not misinterpreted as html 2026-04-28 14:32:15 +02:00
Tomas Hykel 89d3a2c3f0 fix: Correctly avoid problematic identifiers in semantic identifier generation 2026-04-27 16:01:52 +02:00
Tomas Hykel 0001feb9a8 refactor: Improve readability of project identifier validators 2026-04-27 15:22:18 +02:00
OpenProject Actions CI b0bb456e1c Merge branch 'release/17.4' into dev 2026-04-23 16:26:04 +00:00
as-op 29a49690b1 replace invalid sequences with ? 2026-04-23 17:04:41 +02:00
as-op 39df946927 also check with multi-byte languages 2026-04-23 15:57:02 +02:00