Commit graph

9 commits

Author SHA1 Message Date
Yorick Peterse
57b96eb6db
Fix refreshing of issues/MR count caches
This ensures the open issues/MR count caches are refreshed properly when
creating new issues or MRs. This MR also includes a change to the cache
keys to ensure all caches are rebuilt on the fly.

This particular problem was not caught in the test suite due to a null
cache being used, resulting in all calls that would use a cache using
the underlying data directly. In production the code would fail because
a newly saved record returns an empty hash in #changes meaning checks
such as `state_changed? || confidential_changed?` would return false for
new rows, thus never updating the counters.

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/38061
2017-09-19 17:16:45 +02:00
Sean McGivern
0e488ef70a Clear issuable counter caches on update
When an issuable's state changes, or one is created, we should clear the cache
counts for a user's assigned issuables, and also the project-wide caches for
this user type.
2017-07-19 10:21:20 +01:00
Valery Sizov
33687db01d Fix counters cache invalidation for Issues and Merge Requests 2017-05-26 17:43:51 +03:00
Rémy Coutable
a54fdc384f Enforce permissions in {Issues,MergeRequests}::{Close,Reopen}Service
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-08-13 00:06:11 +02:00
Douglas Barbosa Alexandre
3d52e139b1 Rename Tasks to Todos 2016-02-20 12:39:27 -02:00
Douglas Barbosa Alexandre
c86b12bf69 Marks pending tasks for an user as done when he close the MR 2016-02-20 12:10:26 -02:00
Dmitriy Zaporozhets
9d85ea3acf Organize event order execution when update issue or mr 2015-01-25 22:49:05 -08:00
jubianchi
4ffdb83e71 Add action property to merge request hook 2015-01-20 10:50:24 +01:00
Dmitriy Zaporozhets
3c867dfa8e
MergeRequest services for create, update, close and reopen
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-04-02 21:51:17 +03:00