Project

General

Profile

User story #1048

Sprint Board - Show two decimal cases on Post-its

Added by Leonardo Sena almost 9 years ago.

Status:
New
Priority:
Normal
Category:
-
Target version:
-
Blocked:
No
Alone:
Milestones:
Sprint:

Description

I noticed that on Time by Activity the effort and spent time are shown with two decimal values.
While on the Sprint Board they can show up to 6 values, like 1,666667

So my suggestion is to either round the post-its info aswell, or create a setting on the plugins page to define that value.

  • x\scrum\app\helpers\scrum_helper.rb
    def render_hours(hours, options = {})
        if hours.nil?
          "" 
        else
          if hours.is_a?(Integer)
            text = ("%d" % hours.round(2)) unless options[:ignore_zero] and hours == 0
          elsif hours.is_a?(Float)
            text = ("%g" % hours.round(2)) unless options[:ignore_zero] and hours == 0.0
          else
            text = hours.round(2) unless options[:ignore_zero] and (hours.blank? or (hours == "0"))
          end
          unless text.blank?
            text = "#{text}h" 
            unless options[:link].nil?
              text = link_to(text, options[:link])
            end
            render :inline => "<span title=\"#{options[:title]}\">#{text}</span>" 
          end
        end
      end
    

No data to display

Also available in: Atom PDF