Commit bb0a47d410347f1ab7c5c30b8e6222354baee349

Authored by Dmitriy Zaporozhets
2 parents bea6eba8 984eb08c

Merge pull request #5868 from beautyfree/patch-1

Duplicate opened scope for issue
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 28  
29 29 scope :of_group, ->(group) { where(project_id: group.project_ids) }
30 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 32 scope :closed, -> { with_state(:closed) }
33 33  
34 34 attr_accessible :title, :assignee_id, :position, :description,
... ... @@ -56,9 +56,6 @@ class Issue < ActiveRecord::Base
56 56 state :closed
57 57 end
58 58  
59   - # Both open and reopened issues should be listed as opened
60   - scope :opened, -> { with_state(:opened, :reopened) }
61   -
62 59 # Mentionable overrides.
63 60  
64 61 def gfm_reference
... ...