Add 'New' badge to work items nav item
What does this MR do and why?
This MR adds a "New" badge to the Work Items navigation menu.
- Adds a blue info badge displaying "New" next to "Work Items" in the sidebar navigation
- The badge automatically dismisses after users visit the work items page for the first time
- The badge disappears after April 4, 2026
- Includes tooltip text explaining "Issues are now work items" (or "Epics and issues are now work items" for groups with epics license)
Backend Changes
- Added
work_items_nav_badgecallout toUsers::Calloutmodel for tracking dismissal - Updated
WorkItemsMenuin both groups and projects sidebars to include badge data - Added controller logic to dismiss the badge when users visit work items index pages
Frontend Changes
-
nav_item.vuecomponent can render badges with tooltips - Badge displays conditionally based on backend data
References
Screenshots or screen recordings
| Before | After |
|---|---|
|
|
|
How to set up and validate locally
Scenario 1: Badge shows on first visit
- Ensure the
work_items_saved_viewsfeature flag is enabled for your user - Navigate to a group or project
- Look for the "Work Items" menu item
- Confirm the "New" badge appears next to "Work Items"
- Hover over the badge
- Tooltip shows "Issues are now work items." (or "Epics and issues are now work items." for groups with epics)
Scenario 2: Badge dismisses after visiting work items page
- Follow Scenario 1 setup to ensure badge is showing
- Click on "Work Items" in the sidebar
- Navigate back to another page (e.g., Projects, Groups)
- Open the super sidebar again
- Expected: The "New" badge no longer appears
Note: You can re-enable the badge to appear after this by doing this in your rails console user = User.find_by(username: 'your-username') and then user.callouts.where(feature_name: 'work_items_nav_badge').destroy_all
Scenario 3: Badge does not appear after April 4, 2026
- Change your current date on line 11 in
lib/sidebars/concerns/show_work_items_badge.rbto be after April 4, 2026 - Navigate to a group or project
- No "New" badge appears
Scenario 4: Badge shows for both groups and projects
- Navigate to a group
- Expected: Badge shows before first visit, dismisses after
- Destroy your callout
- Navigate to /your-namespace/your-project/-/work_items
- Expected: Badge shows before first visit, dismisses after
Note: Dismissing on one group or project dismisses for all locations since it's a user level callout
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Related to #586896 (closed)


