Adapt work package lists for semantic identifiers#22719
Conversation
1f8bf4c to
a88120e
Compare
f134595 to
ad322ec
Compare
a88120e to
d517a42
Compare
ad322ec to
e6d8ead
Compare
d517a42 to
39ffe42
Compare
16ee4b5 to
6895b28
Compare
39ffe42 to
a0ef1df
Compare
6895b28 to
8f40e32
Compare
a0ef1df to
eef1772
Compare
cc59e9c to
22f55c6
Compare
d3017b4 to
927e856
Compare
22f55c6 to
c12fe21
Compare
927e856 to
99543cc
Compare
c12fe21 to
e3ccb40
Compare
99543cc to
6266550
Compare
78767de to
8f012b3
Compare
7d160d6 to
0c3e8bd
Compare
8f012b3 to
e76ab89
Compare
0c3e8bd to
c6b4d48
Compare
e76ab89 to
9372285
Compare
257e36d to
abe86e8
Compare
9372285 to
ac24e63
Compare
abe86e8 to
95be852
Compare
ac24e63 to
42408c8
Compare
2fb1cff to
4c1b1a6
Compare
4c1b1a6 to
26f87c6
Compare
42408c8 to
bf9dcb1
Compare
Replace hardcoded `#{{ wp.id }}` patterns with `wp.displayIdWithHash`
across all display sites: cards, relations, quickinfo macros, destroy
modal, notifications, and timer modal. This ensures semantic identifiers
(e.g. #PROJ-42) render correctly in all views.
Override valueString in WorkPackageIdDisplayField to return the semantic identifier from displayId instead of the numeric PK, so the table ID column shows "PROJ-42" in semantic mode.
The render() method passed this.value (numeric PK) as both the routing ID and the visible link content. The displayText parameter — which carries the user-facing identifier from valueString — was only used as the title attribute. Change the third argument to linkToShow() from this.value to displayText so the link's textContent shows "PROJ-7" (semantic) or "123" (classic) instead of always showing the numeric PK. Add spec covering valueString fallback and render output assertions.
Follow-up to the base branch rename. Also updates wpFormattedId to apply conditional hash logic: semantic identifiers (containing letters) render without #, numeric IDs keep the # prefix.
e1a7da3 to
e1cac12
Compare
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Ticket
https://community.openproject.org/work_packages/73717
Important
NB: Take note of the following subsequent work not covered in this PR
What are you trying to accomplish?
Use the new
formattedIdproperty consistently across all work package list and card views, replacing hard-coded#{{ wp.id }}patterns that would show the numeric PK instead of the semantic identifier.What approach did you choose and why?
PR #22704 added
displayIdandformattedIdtoWorkPackageBaseResource.formattedIdconditionally prefixes#only for classic numeric IDs — semantic identifiers likePROJ-42are self-describing and render without a prefix, matching Jira's convention.This PR updates all remaining display sites to use them:
#{{ wp.id }}to{{ wp.formattedId }}#{{ wp.id }}or'#' + workPackage.idWorkPackageDisplayField,LinkedWorkPackageDisplayField) — addedwpFormattedIdgetter with semantic ID support: when the linked resource is loaded, it readsdisplayIdand applies the same conditional hash logic; otherwise it falls back to hash-prefixed numeric ID from the self-link hrefThis means every place that shows a work package identifier to users now goes through
formattedId, soPROJ-42renders correctly in semantic mode and#123in classic mode, with no per-view conditional logic.Merge checklist