Commit 984eb08cbe15def95f1cfc2eff32fcb03eb3981b
1 parent
26c8b316
Exists in
master
and in
4 other branches
Duplicate opened scope for issue
Was it correct?
Showing
1 changed file
with
1 additions
and
4 deletions
Show diff stats
app/models/issue.rb
@@ -28,7 +28,7 @@ class Issue < ActiveRecord::Base | @@ -28,7 +28,7 @@ class Issue < ActiveRecord::Base | ||
28 | 28 | ||
29 | scope :of_group, ->(group) { where(project_id: group.project_ids) } | 29 | scope :of_group, ->(group) { where(project_id: group.project_ids) } |
30 | scope :of_user_team, ->(team) { where(project_id: team.project_ids, assignee_id: team.member_ids) } | 30 | scope :of_user_team, ->(team) { where(project_id: team.project_ids, assignee_id: team.member_ids) } |
31 | - scope :opened, -> { with_state(:opened) } | 31 | + scope :opened, -> { with_state(:opened, :reopened) } |
32 | scope :closed, -> { with_state(:closed) } | 32 | scope :closed, -> { with_state(:closed) } |
33 | 33 | ||
34 | attr_accessible :title, :assignee_id, :position, :description, | 34 | attr_accessible :title, :assignee_id, :position, :description, |
@@ -56,9 +56,6 @@ class Issue < ActiveRecord::Base | @@ -56,9 +56,6 @@ class Issue < ActiveRecord::Base | ||
56 | state :closed | 56 | state :closed |
57 | end | 57 | end |
58 | 58 | ||
59 | - # Both open and reopened issues should be listed as opened | ||
60 | - scope :opened, -> { with_state(:opened, :reopened) } | ||
61 | - | ||
62 | # Mentionable overrides. | 59 | # Mentionable overrides. |
63 | 60 | ||
64 | def gfm_reference | 61 | def gfm_reference |