gitlab-org--gitlab-foss/app
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
..
assets Merge issuable "reopened" state into "opened" 2017-07-28 13:31:51 +02:00
controllers Merge branch 'backport-2844-ldap-ee-license-checks' into 'master' 2017-07-28 09:13:50 +00:00
finders Merge issuable "reopened" state into "opened" 2017-07-28 13:31:51 +02:00
helpers Merge branch 'bvl-add-all-settings-to-api' into 'master' 2017-07-27 23:55:23 +00:00
mailers find_by_id -> find_by(:id, ...) 2017-07-27 15:43:37 +02:00
models Merge issuable "reopened" state into "opened" 2017-07-28 13:31:51 +02:00
policies Merge branch '30634-protected-pipeline' into 'master' 2017-07-25 15:04:23 +00:00
presenters Make commits behind text a link to the target branch commits page 2017-07-11 11:49:22 -05:00
serializers Merge branch '35338-deploy-keys-should-not-show-pending-delete-projects' into 'master' 2017-07-26 08:27:41 +00:00
services Merge issuable "reopened" state into "opened" 2017-07-28 13:31:51 +02:00
uploaders Merge branch '33359-pers-snippet-files-location' into 'security-9-3' 2017-07-19 22:28:27 -05:00
validators
views Merge branch '35224-transform-user-profile-javascript-into-async-bundle' into 'master' 2017-07-28 07:27:13 +00:00
workers remove log statements from workers 2017-07-27 15:46:04 +02:00