Skip to content

Feature/COMMS-1004: Labels for work package show page - #25551

Closed
akabiru wants to merge 10 commits into
devfrom
feature/comms-1004-labels-for-work-package-show-page
Closed

akabiru wants to merge 10 commits into
devfrom
feature/comms-1004-labels-for-work-package-show-page

Conversation

@akabiru

@akabiru akabiru commented Sep 23, 2026 •

Copy link
Copy Markdown
Member

https://community.openproject.org/wp/COMMS-1004

Work packages show their labels on the full and split view, and users with edit_work_packages edit them inline: a multi-select that searches labels on the server, lists labels already used in the current workspace first and the most used ones after, and saves with the field's own save/cancel controls. New labels can be created straight from the dropdown; creation dedupes case-insensitively and hands back the existing label when the same name lands concurrently, and the admin form reports that race as the usual "already taken" error instead of failing. Everything sits behind the work_package_labels feature flag.

Screenshots

Full view, Details group

Initial dropdown order: used in this workspace, then most used, then name

Create option pinned below the results

Split view

Labels are global and unbounded, so allowed values are linked to a
project-scoped endpoint rather than embedded. The flag joins the schema
cache dependencies so toggling it does not serve stale schemas.
The work package labels dropdown needs labels already used in the current
workspace first, then the most used ones, so the schema points at this
endpoint instead of the global listing.
Creating a label from the work package dropdown must hand back the
existing label when one with the same name in another casing exists,
including when it appears concurrently between lookup and insert.
A duplicate inserted between the uniqueness validation and the INSERT
raised through the admin form as a 500. The create service now turns the
unique index violation into the same "taken" error, so every caller,
including the find-or-create path, handles the race the same way.
Labels can now be created through the API.
Assigning labels does not touch the work package row, so without this
the cached JSON representation kept serving the previous labels.
@akabiru akabiru self-assigned this Sep 23, 2026
@akabiru akabiru added the ai: Collaborative 💻 AI generated a substantial part of the code; A human reviewed and understands every line. label Sep 23, 2026
@akabiru akabiru added this to the 18.0.x milestone Sep 23, 2026
@github-actions github-actions Bot removed the ai: Collaborative 💻 AI generated a substantial part of the code; A human reviewed and understands every line. label Sep 23, 2026
Labels render like the other multi-value attributes and are edited in a
multi-select that searches on the server so the workspace-relevance
ordering is kept. A dedicated labels autocompleter holds the fetching so
other surfaces can reuse it.
The create option is pinned below the options and only offered while
the typed name matches no loaded label. The created label joins the
open selection and is saved with the field.
@akabiru

akabiru commented Sep 23, 2026

Copy link
Copy Markdown
Member Author

Superseded by a stack of smaller PRs, one per child work package: COMMS-1046 (schema and labels-by-workspace API), COMMS-1047 (label creation API), COMMS-1048 (labels field on the work package view). Links follow once the stack is up.

@akabiru akabiru closed this Sep 23, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 23, 2026
@akabiru

akabiru commented Sep 23, 2026

Copy link
Copy Markdown
Member Author

Stack: #25552 (COMMS-1046) → #25553 (COMMS-1047) → #25554 (COMMS-1048).

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.

1 participant