Skip to content

Fix group work item count caching

Issue: Follow-up: Fix group level work item count caching (#572737)

What does this MR do and why?

Problem:

Currently, the cache_issues_count? method returns false for the group issues list, so the counts are never cached.

This is due to the params_include_filters? returning true, since we also pass in include_ancestors and exclude_group_work_items into the query.

This causes the EEgetWorkItemStateCounts graphql query to fail for large groups like the gitlab-org https://gitlab.com/groups/gitlab-org/-/issues

Screenshot_2025-10-22_at_5.02.44_PM

With this MR we fix the count caching issue for group issues/work_items

References

Screenshots or screen recordings

This MR does not contain any UI changes

Before After

How to set up and validate locally

  1. Add a breakpoint in the cache_issues_count? method in lib/gitlab/issuables_count_for_state.rb
  2. Navigate to http://gdk.test:3000/groups/<some-group>/-/issues
  3. Confirm that cache_issues_count? returns true

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.

Edited by Daniyal Arshad

Merge request reports

Loading