From a28009621916349750920edee59b0c6e859df20d Mon Sep 17 00:00:00 2001 From: Julien Lancelot Date: Fri, 21 Feb 2014 17:06:45 +0100 Subject: [PATCH] SONAR-4996 Fix display of debt measure --- .../src/main/webapp/WEB-INF/app/models/project_measure.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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 -- 2.39.5