Defect #14737

Gantt, completed % truncated instead of rounded

Added by Jérôme BATAILLE about 5 years ago. Updated over 4 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Gantt
Target version:2.6.0
Resolution:Fixed Affected version:

RM_14737_gantt_completed_pourcent_truncated.diff Magnifier (834 Bytes) Jérôme BATAILLE, 2013-08-21 16:23

RM_14737_gantt_completed_pourcent_truncated.diff Magnifier (778 Bytes) Jérôme BATAILLE, 2013-08-22 15:29

edit.png (6 KB) Toshi MARUYAMA, 2014-05-14 13:45

view.png (5.79 KB) Toshi MARUYAMA, 2014-05-14 13:45


Related issues

Duplicated by Redmine - Feature #13442: Gantt : rounding error for version completed percent Closed

Associated revisions

Revision 13137
Added by Toshi MARUYAMA over 4 years ago

gantt: completed percent truncated instead of rounded (#14737)

Contributed by Jérôme BATAILLE.

History

#2 Updated by Daniel Felix about 5 years ago

+1 to the patch.
But English comments would be better. ;-)

#4 Updated by Daniel Felix about 5 years ago

Np. Looks better. :-)

#5 Updated by Jérôme BATAILLE over 4 years ago

Any chance that this very simple patch could be integrated to the core ?

#6 Updated by Toshi MARUYAMA over 4 years ago

This problem is not only pdf but also web form.

diff --git a/app/views/issues/_attributes.html.erb b/app/views/issues/_attributes.html.erb
--- a/app/views/issues/_attributes.html.erb
+++ b/app/views/issues/_attributes.html.erb
@@ -63,7 +63,7 @@
 <% end %>

 <% if @issue.safe_attribute? 'estimated_hours' %>
-<p><%= f.text_field :estimated_hours, :size => 3, :disabled => !@issue.leaf?, :required => @issue.required_attribute?('estimated_hours') %> <%= l(:field_hours) %></p>
+<p><%= f.text_field :estimated_hours, :size => 10, :disabled => !@issue.leaf?, :required => @issue.required_attribute?('estimated_hours') %> <%= l(:field_hours) %></p>
 <% end %>

 <% if @issue.safe_attribute?('done_ratio') && @issue.leaf? && Issue.use_field_for_done_ratio? %>


#7 Updated by Jérôme BATAILLE over 4 years ago

Hi Toshi,

You are talking about estimated_hours, do you mean that this is linked to done_ratio ?
The only place I have found this issue is in the Gantt, on the versions display percent is not truncated.

#8 Updated by Jérôme BATAILLE over 4 years ago

Duplicated by #13442

#9 Updated by Toshi MARUYAMA over 4 years ago

Jérôme BATAILLE wrote:

Hi Toshi,

You are talking about estimated_hours, do you mean that this is linked to done_ratio ?
The only place I have found this issue is in the Gantt, on the versions display percent is not truncated.

Sorry, I confused with #12510#note-15.

#10 Updated by Toshi MARUYAMA over 4 years ago

  • Target version set to 2.5.2

#11 Updated by Toshi MARUYAMA over 4 years ago

  • Target version changed from 2.5.2 to 2.6.0

#12 Updated by Toshi MARUYAMA over 4 years ago

  • Related to Feature #13442: Gantt : rounding error for version completed percent added

#13 Updated by Toshi MARUYAMA over 4 years ago

  • Related to deleted (Feature #13442: Gantt : rounding error for version completed percent)

#14 Updated by Toshi MARUYAMA over 4 years ago

  • Duplicated by Feature #13442: Gantt : rounding error for version completed percent added

#15 Updated by Toshi MARUYAMA over 4 years ago

It is reasonable because issue form uses round.
source:tags/2.5.1/app/helpers/application_helper.rb#L1122

#16 Updated by Toshi MARUYAMA over 4 years ago

  • Status changed from New to Closed
  • Resolution set to Fixed

Committed in trunk r13137, thanks.

#17 Updated by Jérôme BATAILLE over 4 years ago

Thanks a lot ! this is Smile 13'th patch integrated into the core.

Also available in: Atom PDF