summaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-04-21 19:45:14 +0200
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-04-21 19:45:14 +0200
commit3fdba5c96bcc3ccc8623f007127c530b1472b10f (patch)
treecd78593a357074adbef5e2a6a885c33a475d906e /app/models
parent9c35162f83fb62349b922baaf192038522b09793 (diff)
downloadgitlab-ce-3fdba5c96bcc3ccc8623f007127c530b1472b10f.tar.gz
Fix missing pipeline duration for blocked pipelines
Diffstat (limited to 'app/models')
-rw-r--r--app/models/ci/pipeline.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/ci/pipeline.rb b/app/models/ci/pipeline.rb
index 445247f1b41..75a8ab2f5cd 100644
--- a/app/models/ci/pipeline.rb
+++ b/app/models/ci/pipeline.rb
@@ -75,6 +75,10 @@ module Ci
pipeline.update_duration
end
+ before_transition any => [:manual] do |pipeline|
+ pipeline.update_duration
+ end
+
before_transition canceled: any - [:canceled] do |pipeline|
pipeline.auto_canceled_by = nil
end