aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulien Lancelot <julien.lancelot@gmail.com>2014-02-21 17:06:45 +0100
committerJulien Lancelot <julien.lancelot@gmail.com>2014-02-25 19:01:22 +0100
commita28009621916349750920edee59b0c6e859df20d (patch)
tree75a46a0934b1176ea06ee9a5b9b80d884fb87044
parent73226c06cf490ef5b82cc7e9816fba82723871e8 (diff)
downloadsonarqube-a28009621916349750920edee59b0c6e859df20d.tar.gz
sonarqube-a28009621916349750920edee59b0c6e859df20d.zip
SONAR-4996 Fix display of debt measure
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/models/project_measure.rb7
1 files 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