Add count to Work items sidebar nav item
What does this MR do and why?
This MR adds count back to Work items nav. It mimics the issue count except
- Epics are now consider in groups work items list
- Requirements are not considered for group or project
- If records are above 10000, it will just show 10k
Limitations
- The count does not automatically changes after work items is created/moved/deleted.
References
- Closes #593599
Screenshots or screen recordings
| Project | Group | |
|---|---|---|
| No records | ![]() |
![]() |
| Records below 1000 | ![]() |
![]() |
| Records above 1000 | ![]() |
|
| Records above 10000 | ![]() |
How to set up and validate locally
Prerequisites
- Enable the feature flag to show the count
show_work_items_sidebar_count
Steps to reproduce
- Create an empty group and project
- Create 10000 work items
- Verify the count
Steps to test 10K+ records (no data generation needed)
-
In
app/graphql/types/namespaces/sidebar_type.rb, temporarily hardcodeopen_work_items_countto return10010:def open_work_items_count return unless Feature.enabled?(:show_work_items_sidebar_count, context[:current_user]) # TEMPORARY: hardcoded for reviewer testing — always returns 10010 # (above the 10,000 limit, so the sidebar should display "10k+") 10010 end -
Enable the feature flag
show_work_items_sidebar_count -
Navigate to any group or project sidebar
-
Verify the Work Items nav item displays "10k+"
-
Revert the hardcoded change after testing
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 #593599
Edited by Rajan Mistry





