Defect #33273

Total estimated time column shows up as decimal value regardless of time setting

Added by Farook Al-Sammarraie 7 months ago. Updated 6 months ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Go MAEDA% Done:

0%

Category:Issues list
Target version:4.1.2
Resolution:Fixed Affected version:4.1.0

Description

the reason for the issue is that total_estimated_hours is missing from queries_helper.rb

the issue can be fixed by changing lines 170 and 241:

diff --git a/app/helpers/queries_helper.rb b/app/helpers/queries_helper.rb
index 2e5b86b6e..a9d8cff6f 100644
--- a/app/helpers/queries_helper.rb
+++ b/app/helpers/queries_helper.rb
@@ -167,7 +167,7 @@ module QueriesHelper
   def total_tag(column, value)
     label = content_tag('span', "#{column.caption}:")
     value =
-      if [:hours, :spent_hours, :total_spent_hours, :estimated_hours].include? column.name
+      if [:hours, :spent_hours, :total_spent_hours, :estimated_hours, :total_estimated_hours].include? column.name
         format_hours(value)
       else
         format_object(value)
@@ -238,7 +238,7 @@ module QueriesHelper
         'span',
         value.to_s(item) {|other| link_to_issue(other, :subject => false, :tracker => false)}.html_safe,
         :class => value.css_classes_for(item))
-    when :hours, :estimated_hours
+    when :hours, :estimated_hours, :total_estimated_hours
       format_hours(value)
     when :spent_hours
       link_to_if(value > 0, format_hours(value), project_time_entries_path(item.project, :issue_id => "#{item.id}"))

(I already fixed it on my instance)

I'm not exactly sure if subversion supports something like pull requests in git, so i'm opening an issue instead

33273-test.patch Magnifier (1.05 KB) Go MAEDA, 2020-04-12 04:52

33273_4.0.8.patch Magnifier (2.64 KB) Marius BALTEANU, 2020-04-16 18:04


Related issues

Related to Redmine - Feature #23996: Introduce a setting to change the display format of times... Closed
Related to Redmine - Feature #20688: Add Total estimated hours column on issue list Closed

Associated revisions

Revision 19702
Added by Go MAEDA 7 months ago

Total estimated time column shows up as decimal value regardless of time setting (#33273).

Patch by Farook Al-Sammarraie.

Revision 19703
Added by Go MAEDA 7 months ago

Test for r19702 (#33273).

Patch by Go MAEDA.

Revision 19704
Added by Go MAEDA 7 months ago

Merged r19702 and r19703 from trunk to 4.1-stable (#33273).

History

#1 Updated by Go MAEDA 7 months ago

  • Related to Feature #23996: Introduce a setting to change the display format of timespans to HH:MM added

#2 Updated by Go MAEDA 7 months ago

  • Related to Feature #20688: Add Total estimated hours column on issue list added

#3 Updated by Go MAEDA 7 months ago

  • Description updated (diff)
  • Status changed from New to Confirmed
  • Target version set to Candidate for next minor release

#4 Updated by Go MAEDA 7 months ago

  • File 33273-test.patchMagnifier added
  • Target version changed from Candidate for next minor release to 4.1.2

Here is a test for the patch.

Setting the target version to 4.1.2.

#5 Updated by Marius BALTEANU 7 months ago

  • Subject changed from total esitmated time column shows up as decimal value regardless of time setting to Total estimated time column shows up as decimal value regardless of time setting

#6 Updated by Go MAEDA 7 months ago

  • Status changed from Confirmed to Closed
  • Assignee set to Go MAEDA
  • Resolution set to Fixed

Committed the patch. Thank you for your report and fix.

#7 Updated by Marius BALTEANU 7 months ago

Go MAEDA wrote:

Committed the patch. Thank you for your report and fix.

Go Maeda, is there any reason for why we don't merge this to 4.0.8 as well?

#8 Updated by Go MAEDA 7 months ago

Marius BALTEANU wrote:

Go Maeda, is there any reason for why we don't merge this to 4.0.8 as well?

This is because I simply didn't want to do manual work. r19702 cannot be auto-merged to 4.0-stable. But I will do it if you or someone think that the fix should be a part of 4.0.8.

#9 Updated by Marius BALTEANU 7 months ago

  • File 33273_4.0.8.patchMagnifier added
  • Status changed from Closed to Reopened
  • Target version changed from 4.1.2 to 4.0.8

Attached the patch to back port to 4.0.8 as well.

#10 Updated by Go MAEDA 6 months ago

Marius BALTEANU wrote:

Attached the patch to back port to 4.0.8 as well.

Thank you for the patch but the test fails.

Failure:
IssuesControllerTest#test_index_should_respect_timespan_format [test/functional/issues_controller_test.rb:1607]:
<200:00> expected but was
<>..
Expected 0 to be >= 1.

bin/rails test test/functional/issues_controller_test.rb:1598

#11 Updated by Marius BALTEANU 6 months ago

  • Status changed from Reopened to Closed
  • Target version changed from 4.0.8 to 4.1.2

Sorry for not running the tests.

Also available in: Atom PDF