Prevent unnecessary work item refetches by updating cache correctly

What does this MR do and why?

Add proper cache modification to prevent parent work item refetches

  • Add merge policies for userPermissions and namespace.userPermissions
  • Keep cache.modify to update specific fields instead of the whole query
  • Remove refs and toReference usage when updating the cache

References

#577802

Screenshots or screen recordings

Before After
Screencast_from_2025-10-20_11-32-53 Screencast_from_2025-10-20_15-01-59

How to set up and validate locally

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 #577802

Merge request reports

Loading