diff options
Diffstat (limited to 'app/models/concerns/time_trackable.rb')
-rw-r--r-- | app/models/concerns/time_trackable.rb | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/app/models/concerns/time_trackable.rb b/app/models/concerns/time_trackable.rb index 70bc45b382a..0f361e70a91 100644 --- a/app/models/concerns/time_trackable.rb +++ b/app/models/concerns/time_trackable.rb @@ -45,13 +45,7 @@ module TimeTrackable # rubocop:enable Gitlab/ModuleWithInstanceVariables def total_time_spent - sum = timelogs.sum(:time_spent) - - # A new restriction has been introduced to limit total time spent to - - # Timelog::MAX_TOTAL_TIME_SPENT or 3.154e+7 seconds (approximately a year, a generous limit) - # Since there could be existing records that breach the limit, check and return the maximum/minimum allowed value. - # (some issuable might have total time spent that's negative because a validation was missing.) - sum.clamp(-Timelog::MAX_TOTAL_TIME_SPENT, Timelog::MAX_TOTAL_TIME_SPENT) + timelogs.sum(:time_spent) end def human_total_time_spent |