]> source.dussan.org Git - redmine.git/commitdiff
Optimize FixedIssuesExtension#closed_percent by bypassing issues_progress when all...
authorGo MAEDA <maeda@farend.jp>
Mon, 17 Jun 2024 06:57:57 +0000 (06:57 +0000)
committerGo MAEDA <maeda@farend.jp>
Mon, 17 Jun 2024 06:57:57 +0000 (06:57 +0000)
Patch by Go MAEDA (@maeda).

git-svn-id: https://svn.redmine.org/redmine/trunk@22881 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/version.rb

index c12420c3fab7e533b4b2fa86599f87a8addae40a..f485bae5f6b40ab870495e59626fc519c9b74be1 100644 (file)
@@ -54,6 +54,7 @@ module FixedIssuesExtension
   # Returns the percentage of issues that have been marked as 'closed'.
   def closed_percent
     return 0 if open_count + closed_count == 0
+    return 100 if open_count == 0
 
     issues_progress(false)
   end