Skip to content

Use formatted_id in server-rendered work package detail views#22788

Open
akabiru wants to merge 2 commits intoimplementation/73922-use-formattedid-in-autocompleter-and-global-search-resultsfrom
implementation/73921-use-displayid-in-work-package-detail-view
Open

Use formatted_id in server-rendered work package detail views#22788
akabiru wants to merge 2 commits intoimplementation/73922-use-formattedid-in-autocompleter-and-global-search-resultsfrom
implementation/73921-use-displayid-in-work-package-detail-view

Conversation

@akabiru
Copy link
Copy Markdown
Member

@akabiru akabiru commented Apr 15, 2026

Ticket

https://community.openproject.org/wp/73921

What are you trying to accomplish?

Server-rendered work package display sites (Relations tab, hover cards, version widgets, backlogs, meetings, time tracking) were still showing hard-coded #<numeric-id> instead of the semantic identifier when semantic mode is active.

Screenshots

Before: Relations tab shows #12079, #179, etc.
After: Relations tab shows MYPROJ-1, MYPROJ-2, etc. in semantic mode; #42 in classic mode.

Screenshot 2026-04-15 at 8 36 08 PM

What approach did you choose and why?

Adds a WorkPackage#formatted_id method to the SemanticIdentifier concern - the backend counterpart of the frontend formattedId getter. It uses the same detection logic: if display_id contains letters (semantic), return as-is; if purely numeric (classic), prefix with #.

Since InfoLineComponent is the shared component used across several server-rendered WP display sites, this single change should propagate to:

  • Relations tab (related WPs, parent, children)
  • Hover cards
  • Version related issues widget
  • Backlogs (story component, inbox items)
  • Meeting agenda items and outcomes
  • Time tracking entry rows

Merge checklist

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

@akabiru akabiru self-assigned this Apr 15, 2026
@akabiru akabiru added this to the 17.4.x milestone Apr 15, 2026
@akabiru akabiru force-pushed the feature/73717-adapt-work-package-lists-for-project-based-semantic-work-package-identifiers branch from e1a7da3 to e1cac12 Compare April 15, 2026 17:56
Base automatically changed from feature/73717-adapt-work-package-lists-for-project-based-semantic-work-package-identifiers to dev April 21, 2026 15:06
@akabiru akabiru force-pushed the implementation/73921-use-displayid-in-work-package-detail-view branch from 4188d61 to c9db8f3 Compare April 21, 2026 15:59
@akabiru akabiru marked this pull request as ready for review April 21, 2026 15:59
@akabiru akabiru requested review from a team April 21, 2026 16:00
akabiru added 2 commits April 21, 2026 20:11
The shared info line rendered hard-coded `#<numeric-id>` instead of
respecting the semantic identifier setting. Use WorkPackage#formatted_id
(added alongside the autocompleter/global-search work) so Relations,
hover cards, version widgets, backlogs, meetings, and time tracking
all pick up semantic IDs like "PROJ-42" in semantic mode, "#42" in
classic mode.
Covers semantic mode, semantic-mode-with-nil-identifier fallback, and
classic mode. Also exercises the pre-existing rendering paths (type,
status, link) that previously had no component-level coverage.
@akabiru akabiru force-pushed the implementation/73921-use-displayid-in-work-package-detail-view branch from 6db634a to 54ba86e Compare April 21, 2026 17:12
@akabiru akabiru changed the base branch from dev to implementation/73922-use-formattedid-in-autocompleter-and-global-search-results April 21, 2026 17:12
Copy link
Copy Markdown
Contributor

@thykel thykel left a comment

Choose a reason for hiding this comment

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

🚀

Copy link
Copy Markdown
Contributor

@judithroth judithroth 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! 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants