]> source.dussan.org Git - redmine.git/commitdiff
Optimize gantt chart rendering for issues without subtasks (#40000).
authorGo MAEDA <maeda@farend.jp>
Wed, 3 Jan 2024 12:14:04 +0000 (12:14 +0000)
committerGo MAEDA <maeda@farend.jp>
Wed, 3 Jan 2024 12:14:04 +0000 (12:14 +0000)
Patch by Go MAEDA (@maeda).

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

lib/redmine/helpers/gantt.rb

index a7b0d715dd91a7024d28396270e85893a8da9b13..a5c6e4b9ff2cee1230b1cc8afa593c8455eef158 100644 (file)
@@ -765,7 +765,7 @@ module Redmine
           tag_options[:id] = "issue-#{object.id}"
           tag_options[:class] = "issue-subject hascontextmenu"
           tag_options[:title] = object.subject
-          children = object.children & project_issues(object.project)
+          children = object.leaf? ? [] : object.children & project_issues(object.project)
           has_children =
             children.present? &&
               (children.collect(&:fixed_version).uniq & [object.fixed_version]).present?