Avoid unnecessary SQL queries by reordering conditions in Gantt version subject rendering (#42681).

Patch by Go MAEDA (user:maeda).


git-svn-id: https://svn.redmine.org/redmine/trunk@23746 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Go MAEDA
2025-05-06 02:34:06 +00:00
parent 2d064e6952
commit c227b006e1

View File

@@ -748,7 +748,7 @@ module Redmine
html_class << (version.behind_schedule? ? 'version-behind-schedule' : '') << " "
html_class << (version.overdue? ? 'version-overdue' : '')
html_class << ' version-closed' unless version.open?
if version.start_date && version.due_date && version.visible_fixed_issues.completed_percent
if version.due_date && version.start_date && version.visible_fixed_issues.completed_percent
progress_date = calc_progress_date(version.start_date,
version.due_date, version.visible_fixed_issues.completed_percent)
html_class << ' behind-start-date' if progress_date < self.date_from