summaryrefslogtreecommitdiff
path: root/app/models/issue.rb
diff options
context:
space:
mode:
authorOswaldo Ferreira <oswaldo@gitlab.com>2017-12-07 15:41:30 -0200
committerOswaldo Ferreira <oswaldo@gitlab.com>2018-01-02 17:45:25 -0200
commitbf8c20729baffbf55605484230ff33680d72139b (patch)
tree70d9bea9ea2a37dc8cd8c37cda396fcf246db72b /app/models/issue.rb
parent2cbb2d0eceaed0f31c92d4eed8932e98f4f74559 (diff)
downloadgitlab-ce-bf8c20729baffbf55605484230ff33680d72139b.tar.gz
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