Conversation
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.
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.
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. |
Member
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://community.openproject.org/wp/COMMS-1004
Work packages show their labels on the full and split view, and users with
edit_work_packagesedit 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 thework_package_labelsfeature 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