Commit Graph

12 Commits

Author SHA1 Message Date
Oswaldo Ferreira bf8c20729b Cache merged and closed events data in merge_request_metrics table 2018-01-02 17:45:25 -02:00
Rob Ede e80f056712 Refresh open Issue and Merge Request project counter caches when re-opening 2017-10-30 16:20:29 +00:00
Yorick Peterse 6ef87a2083
Merge issuable "reopened" state into "opened"
Having two states that essentially mean the same thing is very much like
having a boolean "true" and boolean "mostly-true": it's rather silly.
This commit merges the "reopened" state into the "opened" state while
taking care of system notes still showing messages along the lines of
"Alice reopened this issue".

A big benefit from having only two states (opened and closed) is that
indexing and querying becomes simpler and more performant. For example,
to get all the opened queries we no longer have to query both states:

    SELECT *
    FROM issues
    WHERE project_id = 2
    AND state IN ('opened', 'reopened');

Instead we can query a single state directly, which can be much faster:

    SELECT *
    FROM issues
    WHERE project_id = 2
    AND state = 'opened';

Further, only having two states makes indexing easier as we will only
ever filter (and thus scan an index) using a single value. Partial
indexes could help but aren't supported on MySQL, complicating the
development process and not being helpful for MySQL.
2017-07-28 13:31:51 +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
Douwe Maan ab91f76e8b Add system note with link to diff comparison when MR discussion becomes outdated 2017-05-23 16:27:30 -05: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
Douwe Maan 710c488691 Automatically update diff note positions when MR is pushed to 2016-07-06 18:51:00 -04: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
Marin Jankovski 310231dbed Reopen mr email notification. 2014-07-03 13:40:21 +02: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