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:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-03 18:09:56 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-03 18:09:56 +0300
commitc08d9c22569d1c9e7c7737e183969593394133d9 (patch)
tree8ce1722f852f8921656080e04f6c9e16fa71ddb5 /app/models/concerns/milestoneish.rb
parent546ddc3f6ac96fdf09934390a938bb391d07dc94 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/concerns/milestoneish.rb')
-rw-r--r--app/models/concerns/milestoneish.rb16
1 files changed, 8 insertions, 8 deletions
diff --git a/app/models/concerns/milestoneish.rb b/app/models/concerns/milestoneish.rb
index fac058e5a46..fa5a79cc12b 100644
--- a/app/models/concerns/milestoneish.rb
+++ b/app/models/concerns/milestoneish.rb
@@ -117,20 +117,20 @@ module Milestoneish
false
end
- def total_issue_time_spent
- @total_issue_time_spent ||= issues.joins(:timelogs).sum(:time_spent)
+ def total_time_spent
+ @total_time_spent ||= issues.joins(:timelogs).sum(:time_spent) + merge_requests.joins(:timelogs).sum(:time_spent)
end
- def human_total_issue_time_spent
- Gitlab::TimeTrackingFormatter.output(total_issue_time_spent)
+ def human_total_time_spent
+ Gitlab::TimeTrackingFormatter.output(total_time_spent)
end
- def total_issue_time_estimate
- @total_issue_time_estimate ||= issues.sum(:time_estimate)
+ def total_time_estimate
+ @total_time_estimate ||= issues.sum(:time_estimate) + merge_requests.sum(:time_estimate)
end
- def human_total_issue_time_estimate
- Gitlab::TimeTrackingFormatter.output(total_issue_time_estimate)
+ def human_total_time_estimate
+ Gitlab::TimeTrackingFormatter.output(total_time_estimate)
end
private