Skip to content

[#71896] Add semantic identifier support to project creation & editing on web#22329

Merged
thykel merged 58 commits intodevfrom
feature/71896-change-identifier-with-semantic-identifiers
Mar 19, 2026
Merged

[#71896] Add semantic identifier support to project creation & editing on web#22329
thykel merged 58 commits intodevfrom
feature/71896-change-identifier-with-semantic-identifiers

Conversation

@thykel
Copy link
Contributor

@thykel thykel commented Mar 12, 2026

Ticket

https://community.openproject.org/projects/communicator-stream/work_packages/71896

What are you trying to accomplish?

We are currently adding support for "semantic work package identifiers".

  • old-style numeric identifiers: project ID project-zeus / work package ID 1
  • new-style semantic identifiers: project ID PZEUS / work package PZEUS-1.

This PR rewrites the "Change Project Identifier" functionality to support semantic identifiers.

  • On the project settings page, replace the "Change Identifier" button (that previously lead to a separate setting page) with a new form field that consists of a read-only input box + a button that triggers a modal.
  • Make the modal respect validations for both numeric-style IDs and semantic IDs (based on the administration setting)

Screenshots

Screenshot 2026-03-13 at 14 49 36 Screenshot 2026-03-13 at 14 49 44 Screenshot 2026-03-13 at 14 49 53

What approach did you choose and why?

This PR also incorporates content of #22330 due to a faulty merge.

Merge checklist

  • Added/updated tests
  • Added/updated documentation in Lookbook (patterns, previews, etc)
  • Tested major browsers (Chrome, Firefox, Edge, ...)

@thykel thykel requested review from akabiru and judithroth March 13, 2026 13:47
@thykel thykel marked this pull request as ready for review March 13, 2026 13:50
@thykel
Copy link
Contributor Author

thykel commented Mar 13, 2026

I see there's still a useless vertical scrollbar in the modal alert & some missing whitespace in the main form -- will fix that soon. The rest should be good to review.

@github-actions
Copy link

github-actions bot commented Mar 16, 2026

Deploying openproject with PullPreview

Field Value
Latest commit 8439987
Job deploy
Status ✅ Deploy successful
Preview URL https://pr-22329-71896-change-ide-ip-188-245-84-157.my.opf.run:443

View logs

Copy link
Member

@akabiru akabiru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice one- just a few remarks to consider

module Settings
class EditableIdentifierForm < ApplicationForm
form do |f|
if Project.semantic_alphanumeric_identifier?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🍏 nitpick: I would have expected to see the check Setting::WorkPackageIdentifier.alphanumeric? here- but I see this check Project.semantic_alphanumeric_identifier? includes a feature flag check as well. Still, I wonder if should overload the Project class or keep all (semantic) settings encapsulated within Setting::WorkPackageIdentifier esp as the feature flag should soon be removed

Copy link
Contributor Author

@thykel thykel Mar 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: I would have expected to see the check Setting::WorkPackageIdentifier.alphanumeric? here- but I see this check Project.semantic_alphanumeric_identifier? includes a feature flag check as well.

My original line of thinking was that we don't want someone do this:

  1. Toggle feature flag on
  2. Switch to alphanumeric
  3. Toggle feature flag off
  4. Encounter alphanumeric-specific behaviour in the form

But it's true that the sequence of 2. + 3. is gonna really mess up the app, and this guard is not really going to offer that much help.

Should we maybe prevent users from toggling the feature flag off while alphanumeric setting is still in effect? It's not like the blame would be on us (as it's an experimental feature), but it could make any future testing a bit more safe to execute.

@akabiru
Copy link
Member

akabiru commented Mar 16, 2026

@thykel one UX issue to consider: with semantic identifiers enabled, and user attempts to "change identifier" without the Autofix job having ran/completed- they are not able to type unless they clear all input and start typing. In this scenario- I think the form should be rendered in an invalid state (with a validation message) so the user is made aware.

I understand this might be a moot point once we have the background job- that should already autofix things- but I reckon it's a good failsafe to have from a UX perspective.

https://pr-22329-71896-change-iden-ip-46-224-35-249.my.opf.run/projects/demo-project123/settings/general

@thykel thykel marked this pull request as draft March 19, 2026 00:29
@thykel thykel marked this pull request as ready for review March 19, 2026 06:38
Copy link
Member

@akabiru akabiru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice one 💯. I only found a few issues that are worth clarifying before merge.

config/routes.rb Outdated
resource :filters, only: %i[show]
end

get "projects/identifier_suggestion", to: "projects/identifier_suggestions#show", as: :projects_identifier_suggestion
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🍏 if we can avoid overloading the /project/{id} finder route- I think that would be nice. To keep things simple, and not have to worry about clashes when user sets routing names as identifiers. (noting that we already have "reserved identifiers")

Copy link
Member

@akabiru akabiru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚢 🚢

@thykel thykel changed the title [#71896] Extend the Change Project Identifier functionality Add semantic identifier support to project creation & editing on web Mar 19, 2026
@thykel thykel changed the title Add semantic identifier support to project creation & editing on web [#71896] Add semantic identifier support to project creation & editing on web Mar 19, 2026
@thykel thykel merged commit 5fecd4f into dev Mar 19, 2026
20 of 22 checks passed
@thykel thykel deleted the feature/71896-change-identifier-with-semantic-identifiers branch March 19, 2026 21:51
@github-actions github-actions bot locked and limited conversation to collaborators Mar 19, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants