From: Julien Lancelot Date: Fri, 21 Feb 2014 16:06:45 +0000 (+0100) Subject: SONAR-4996 Fix display of debt measure X-Git-Tag: 4.3~703 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=a28009621916349750920edee59b0c6e859df20d;p=sonarqube.git SONAR-4996 Fix display of debt measure --- diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/project_measure.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/project_measure.rb index f00e6089c2b..53139786ae8 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/project_measure.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/project_measure.rb @@ -164,11 +164,12 @@ class ProjectMeasure < ActiveRecord::Base end def work_duration_formatted_value(value) - if value == 0 + val = value.to_i + if val == 0 '0' else - duration = Internal.work_duration_formatter.abbreviation(value.abs).to_s - value > 0 ? duration : '-' + duration + duration = Internal.work_duration_formatter.abbreviation(val.abs).to_s + val > 0 ? duration : '-' + duration end end