summaryrefslogtreecommitdiff
path: root/app/models/concerns
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2016-09-14 01:25:26 +0800
committerLin Jen-Shin <godfat@godfat.org>2016-09-14 01:25:26 +0800
commit50e62b3eb8ab030e123e990d1335f68478cc4a4b (patch)
treeb25b5c199d2df8a64f271000d57236eb687f86e3 /app/models/concerns
parent05faeec708824bf97c3114b23235859663631b27 (diff)
downloadgitlab-ce-50e62b3eb8ab030e123e990d1335f68478cc4a4b.tar.gz
Fix Commit#status, feedback:fix-multiple-pipeline-events
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6305#note_15230024
Diffstat (limited to 'app/models/concerns')
-rw-r--r--app/models/concerns/has_status.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/concerns/has_status.rb b/app/models/concerns/has_status.rb
index 77fc66a7105..d658552f695 100644
--- a/app/models/concerns/has_status.rb
+++ b/app/models/concerns/has_status.rb
@@ -20,7 +20,7 @@ module HasStatus
skipped = scope.skipped.select('count(*)').to_sql
deduce_status = "(CASE
- WHEN (#{builds})=0 THEN NULL
+ WHEN (#{builds})=(#{created}) THEN NULL
WHEN (#{builds})=(#{skipped}) THEN 'skipped'
WHEN (#{builds})=(#{success})+(#{ignored})+(#{skipped}) THEN 'success'
WHEN (#{builds})=(#{created})+(#{pending})+(#{skipped}) THEN 'pending'