summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-06-04 18:10:53 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-06-04 18:10:53 +0300
commitad60701e9e097a046f65048bd4e707da512daa07 (patch)
tree41894f6f321a436adf29974ef213546aa617a90f /app
parentd95d56f0b9b2a321e18bb0f92b008f58e37b20a7 (diff)
downloadgitlab-ce-ad60701e9e097a046f65048bd4e707da512daa07.tar.gz
Add only open/reopen scopes to issues
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app')
-rw-r--r--app/models/concerns/issuable.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/concerns/issuable.rb b/app/models/concerns/issuable.rb
index 713eab5ad7d..9a227fcef59 100644
--- a/app/models/concerns/issuable.rb
+++ b/app/models/concerns/issuable.rb
@@ -24,6 +24,8 @@ module Issuable
scope :unassigned, -> { where("assignee_id IS NULL") }
scope :of_projects, ->(ids) { where(project_id: ids) }
scope :opened, -> { with_state(:opened, :reopened) }
+ scope :only_opened, -> { with_state(:opened) }
+ scope :only_reopened, -> { with_state(:reopened) }
scope :closed, -> { with_state(:closed) }
delegate :name,