summaryrefslogtreecommitdiff
path: root/app/models/concerns
diff options
context:
space:
mode:
authorShinya Maeda <shinya@gitlab.com>2018-09-21 15:24:19 +0900
committerAlessio Caiazza <acaiazza@gitlab.com>2018-10-02 17:02:11 +0200
commit1a4f497e6093c8d1005986467c8b752cc61c6629 (patch)
tree4ad50ce8528809d31af31ea981328a3a86924b5f /app/models/concerns
parenta7c767f16446f71f6e35a5aa3d2fdc73037fcdf5 (diff)
downloadgitlab-ce-1a4f497e6093c8d1005986467c8b752cc61c6629.tar.gz
Update pipelines and stages status as well
Diffstat (limited to 'app/models/concerns')
-rw-r--r--app/models/concerns/has_status.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/concerns/has_status.rb b/app/models/concerns/has_status.rb
index 0a97e4cdfc4..652f56f7f11 100644
--- a/app/models/concerns/has_status.rb
+++ b/app/models/concerns/has_status.rb
@@ -77,6 +77,7 @@ module HasStatus
state :canceled, value: 'canceled'
state :skipped, value: 'skipped'
state :manual, value: 'manual'
+ state :scheduled, value: 'scheduled'
end
scope :created, -> { where(status: 'created') }
@@ -88,6 +89,7 @@ module HasStatus
scope :canceled, -> { where(status: 'canceled') }
scope :skipped, -> { where(status: 'skipped') }
scope :manual, -> { where(status: 'manual') }
+ scope :scheduled, -> { where(status: 'scheduled') }
scope :alive, -> { where(status: [:created, :pending, :running]) }
scope :created_or_pending, -> { where(status: [:created, :pending]) }
scope :running_or_pending, -> { where(status: [:running, :pending]) }