Project

General

Profile

Patch #25876 » 0001-hide-done_ratio-in-gantt-chart-if-disabled-for-issue.patch

Jens Krämer, 2017-05-17 02:55

View differences:

lib/redmine/helpers/gantt.rb
314 314
      def line_for_issue(issue, options)
315 315
        # Skip issues that don't have a due_before (due_date or version's due_date)
316 316
        if issue.is_a?(Issue) && issue.due_before
317
          label = "#{issue.status.name} #{issue.done_ratio}%"
317
          label = issue.status.name.dup
318
          unless issue.disabled_core_fields.include?('done_ratio')
319
            label << " #{issue.done_ratio}%"
320
          end
318 321
          markers = !issue.leaf?
319 322
          line(issue.start_date, issue.due_before, issue.done_ratio, markers, label, options, issue)
320 323
        end
    (1-1/1)