Loading
Fix cache invalidation on work item deletion
What does this MR do and why?
Fix cache invalidation on work item deletion
issue_assignees has ON DELETE CASCADE on issue_id, so after issuable.destroy the DB rows are gone and issuable.assignees returns an empty result, silently skipping invalidate_cache_counts on assignees.
This bug is visible on the user's dashboard when an assigned work item got deleted. The count on the sidebar doesn't match the count of the assigned work items.
Changelog: fixed
References
Screenshots or screen recordings
| Before | After |
|---|---|
How to set up and validate locally
- Assign a work item to yourself
- See in the dashboard sidebar the count of assigned work items http://gdk.test:3000/dashboard/work_items
- Delete that work item
- Go back to the dashboard -> count on the sidebar for the assigned work items is not correct
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.