Optimize FixedIssuesExtension#closed_percent by bypassing issues_progress when all issues are closed (#40798).

Patch by Go MAEDA (@maeda).


git-svn-id: https://svn.redmine.org/redmine/trunk@22881 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Go MAEDA
2024-06-17 06:57:57 +00:00
parent c132b178a1
commit 35aa00f7ac

View 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