summaryrefslogtreecommitdiff
path: root/app/models/ci/pipeline.rb
diff options
context:
space:
mode:
authorKamil TrzciƄski <ayufan@ayufan.eu>2017-04-24 15:17:02 +0000
committerTimothy Andrew <mail@timothyandrew.net>2017-04-25 05:27:20 +0000
commit1ca792608f45ac2277abedc740968e7f53d39fe7 (patch)
tree2a37b15646118482a93e7b886f487d3d7b645d7d /app/models/ci/pipeline.rb
parent560023a440c09acdcbd8815bacdaafe8a9ff0a94 (diff)
downloadgitlab-ce-1ca792608f45ac2277abedc740968e7f53d39fe7.tar.gz
Merge branch 'fix/gb/fix-blocked-pipeline-duration' into 'master'
Fix missing duration for blocked pipelines Closes #31264 See merge request !10856
Diffstat (limited to 'app/models/ci/pipeline.rb')
-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 e05466360f2..8609c9d3c21 100644
--- a/app/models/ci/pipeline.rb
+++ b/app/models/ci/pipeline.rb
@@ -69,6 +69,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