gitlab-org--gitlab-foss/app/services/merge_requests
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
..
conflicts Enable Style/DotPosition Rubocop 👮 2017-06-21 13:48:12 +00:00
add_todo_when_build_fails_service.rb Make it possible to resolve all todos for pipeline 2017-02-15 10:54:33 +01:00
assign_issues_service.rb Backport of multiple_assignees_feature [ci skip] 2017-05-04 17:11:53 +03:00
base_service.rb Merge issuable "reopened" state into "opened" 2017-07-28 13:31:51 +02:00
build_service.rb Fix 404 when upstream has disabled merge requests 2017-04-27 01:04:07 +03:00
close_service.rb Clear issuable counter caches on update 2017-07-19 10:21:20 +01:00
create_from_issue_service.rb Allow to create new branch and empty WIP merge request from issue page 2017-05-04 08:09:21 +00:00
create_service.rb Backport MR create service changes from EE 2017-07-12 09:45:40 +01:00
get_urls_service.rb Create and use project path helpers that only need a project, no namespace 2017-07-05 11:11:59 -05:00
merge_request_diff_cache_service.rb switch from diff_file_collection to diffs 2016-08-03 07:00:20 +02:00
merge_service.rb Prevent accidental deletion of protected MR source branch by repeating checks before actual deletion 2017-07-04 10:55:36 -05:00
merge_when_pipeline_succeeds_service.rb Update occurrences of MWBS to MWPS 2017-03-01 12:02:02 +01:00
post_merge_service.rb Clear issuable counter caches on update 2017-07-19 10:21:20 +01:00
refresh_service.rb Don't mark empty MRs as merged on push to the target branch 2017-07-07 15:34:33 +01:00
reopen_service.rb Merge issuable "reopened" state into "opened" 2017-07-28 13:31:51 +02:00
resolved_discussion_notification_service.rb Address review feedback 2016-08-16 11:04:26 -05:00
update_service.rb Rename "Slash commands" to "Quick actions" 2017-06-15 09:01:56 -05:00