Draft: Filters Child items by state using GraphQL
What does this MR do and why?
Child items were being filtered based on its state using frontend logic. This was creating issues like mentioned in pagination. This MR
- simplifies by using filters by
state
in GraphQL queries itself. This not only resolves our problem but if the toggle is kept off, it improves performance by fetching only the open item data from the server rather than filtering on the client side. -
Show n closed items
is changed toShow closed items
- The changes affect both the work item tree view and the relationships view.
- As the button do not have other logic, the shared component
WorkItemToggleClosedItems
is also removed.
References
- Related to #516121
Screenshots or screen recordings
Show closed items toggle | Before | After |
---|---|---|
Enabled | Screen Recording 2025-05-14 at 9.49.06 PM.mov | Screen Recording 2025-05-14 at 9.24.56 PM.mov |
Disabled | Screen Recording 2025-05-14 at 9.51.30 PM.mov | Screen Recording 2025-05-14 at 9.55.20 PM.mov |
How to set up and validate locally
- Create an epic with more than 5 child issues or epics present.
- To paginate with lesser items, use the query param http://gdk.test:3000/groups/gitlab-org/-/epics/165?children_count=4
- Click on
Load more
, it should load next batch of 4 children. - Verify if
Load more
does not need to be pressed multiple times to showShow closed items
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 #516121
Edited by Rajan Mistry