Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOswaldo Ferreira <oswaldo@gitlab.com>2017-12-07 20:41:30 +0300
committerOswaldo Ferreira <oswaldo@gitlab.com>2018-01-02 22:45:25 +0300
commitbf8c20729baffbf55605484230ff33680d72139b (patch)
tree70d9bea9ea2a37dc8cd8c37cda396fcf246db72b /app/models/issue.rb
parent2cbb2d0eceaed0f31c92d4eed8932e98f4f74559 (diff)
Cache merged and closed events data in merge_request_metrics table
Diffstat (limited to 'app/models/issue.rb')
-rw-r--r--app/models/issue.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/models/issue.rb b/app/models/issue.rb
index dc64888b6fc..4eafc1316d6 100644
--- a/app/models/issue.rb
+++ b/app/models/issue.rb
@@ -276,6 +276,11 @@ class Issue < ActiveRecord::Base
private
+ def ensure_metrics
+ super
+ metrics.record!
+ end
+
# Returns `true` if the given User can read the current Issue.
#
# This method duplicates the same check of issue_policy.rb