diff options
author | Rémy Coutable <remy@rymai.me> | 2017-10-30 16:20:30 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-10-30 16:20:30 +0000 |
commit | bb63ee682aac171db00bfd2c37395fa1f77a3cae (patch) | |
tree | 4ba75ea0c36763df51bfdab63f3ddf11448297db | |
parent | 7521f8a846fc4da2ac5ecc040f7eb03c3f1f28aa (diff) | |
parent | e80f056712be9013262981ad1bfb1978f7ffbbde (diff) | |
download | gitlab-ce-bb63ee682aac171db00bfd2c37395fa1f77a3cae.tar.gz |
Merge branch '39583-reopen-issue-count-cache' into 'master'
Refresh open Issue and Merge Request project counter caches when re-opening
Closes #39583
See merge request gitlab-org/gitlab-ce!15085
-rw-r--r-- | app/services/issues/reopen_service.rb | 1 | ||||
-rw-r--r-- | app/services/merge_requests/reopen_service.rb | 1 | ||||
-rw-r--r-- | changelogs/unreleased/39583-reopen-issue-count-cache.yml | 5 |
3 files changed, 7 insertions, 0 deletions
diff --git a/app/services/issues/reopen_service.rb b/app/services/issues/reopen_service.rb index 35de4337b15..62b4b4b6a1e 100644 --- a/app/services/issues/reopen_service.rb +++ b/app/services/issues/reopen_service.rb @@ -9,6 +9,7 @@ module Issues notification_service.reopen_issue(issue, current_user) execute_hooks(issue, 'reopen') invalidate_cache_counts(issue, users: issue.assignees) + issue.update_project_counter_caches end issue diff --git a/app/services/merge_requests/reopen_service.rb b/app/services/merge_requests/reopen_service.rb index b9c65be36ec..c599a90f9fe 100644 --- a/app/services/merge_requests/reopen_service.rb +++ b/app/services/merge_requests/reopen_service.rb @@ -11,6 +11,7 @@ module MergeRequests merge_request.reload_diff(current_user) merge_request.mark_as_unchecked invalidate_cache_counts(merge_request, users: merge_request.assignees) + merge_request.update_project_counter_caches end merge_request diff --git a/changelogs/unreleased/39583-reopen-issue-count-cache.yml b/changelogs/unreleased/39583-reopen-issue-count-cache.yml new file mode 100644 index 00000000000..ee35bcbcdae --- /dev/null +++ b/changelogs/unreleased/39583-reopen-issue-count-cache.yml @@ -0,0 +1,5 @@ +--- +title: Refresh open Issue and Merge Request project counter caches when re-opening. +merge_request: 15085 +author: Rob Ede @robjtede +type: fixed |