gitlab-org--gitlab-foss/app/services/issues
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
..
base_service.rb Move duplicate issue management to a service 2017-07-21 12:53:56 +01:00
build_service.rb Refactor resolvability checks based on type 2017-04-06 10:51:45 -05:00
close_service.rb Support both internal and external issue trackers 2017-07-24 08:13:43 +02:00
create_service.rb Enable Style/DotPosition Rubocop 👮 2017-06-21 13:48:12 +00:00
duplicate_service.rb Move duplicate issue management to a service 2017-07-21 12:53:56 +01:00
move_service.rb Native group milestones 2017-07-07 15:08:49 +00:00
reopen_service.rb Merge issuable "reopened" state into "opened" 2017-07-28 13:31:51 +02:00
update_service.rb Move duplicate issue management to a service 2017-07-21 12:53:56 +01:00