aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/sonar-core-plugin
diff options
context:
space:
mode:
authorJulien Lancelot <julien.lancelot@gmail.com>2013-10-07 13:35:09 +0200
committerJulien Lancelot <julien.lancelot@gmail.com>2013-10-07 13:35:09 +0200
commiteb61eba8a4e2dead826feca34b22ca8fc5fa0ffb (patch)
tree63fb2bccde71e2134d0a99a6e1b3f2f1692f3f75 /plugins/sonar-core-plugin
parenta559fa67ec15486009e7dccdb79d6f488699dbc2 (diff)
downloadsonarqube-eb61eba8a4e2dead826feca34b22ca8fc5fa0ffb.tar.gz
sonarqube-eb61eba8a4e2dead826feca34b22ca8fc5fa0ffb.zip
SONAR-4716 Replace remediation cost by technical debt in issue
Diffstat (limited to 'plugins/sonar-core-plugin')
-rw-r--r--plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/issue/IssueTrackingDecorator.java3
-rw-r--r--plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/technicaldebt/TechnicalDebtDecorator.java4
-rw-r--r--plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties7
3 files changed, 7 insertions, 7 deletions
diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/issue/IssueTrackingDecorator.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/issue/IssueTrackingDecorator.java
index b42bff38ae4..90ea63bd8e7 100644
--- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/issue/IssueTrackingDecorator.java
+++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/issue/IssueTrackingDecorator.java
@@ -38,6 +38,7 @@ import org.sonar.api.resources.ResourceUtils;
import org.sonar.api.rules.ActiveRule;
import org.sonar.api.rules.Rule;
import org.sonar.api.rules.RuleFinder;
+import org.sonar.api.technicaldebt.TechnicalDebt;
import org.sonar.api.utils.KeyValueFormat;
import org.sonar.batch.issue.IssueCache;
import org.sonar.batch.scan.LastSnapshots;
@@ -166,7 +167,7 @@ public class IssueTrackingDecorator implements Decorator {
updater.setPastLine(issue, ref.getLine());
updater.setPastMessage(issue, ref.getMessage(), changeContext);
updater.setPastEffortToFix(issue, ref.getEffortToFix(), changeContext);
- updater.setPastRemediationCost(issue, ref.getRemediationCost(), changeContext);
+ updater.setPastTechnicalDebt(issue, TechnicalDebt.fromLong(ref.getTechnicalDebt()), changeContext);
}
}
diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/technicaldebt/TechnicalDebtDecorator.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/technicaldebt/TechnicalDebtDecorator.java
index 0d13f9f6b24..0000fe95f25 100644
--- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/technicaldebt/TechnicalDebtDecorator.java
+++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/technicaldebt/TechnicalDebtDecorator.java
@@ -32,8 +32,8 @@ import org.sonar.api.resources.Resource;
import org.sonar.api.resources.ResourceUtils;
import org.sonar.core.technicaldebt.TechnicalDebtCalculator;
import org.sonar.core.technicaldebt.TechnicalDebtCharacteristic;
+import org.sonar.core.technicaldebt.TechnicalDebtConverter;
import org.sonar.core.technicaldebt.TechnicalDebtRequirement;
-import org.sonar.core.technicaldebt.WorkUnitConverter;
import java.util.Arrays;
import java.util.List;
@@ -111,7 +111,7 @@ public final class TechnicalDebtDecorator implements Decorator {
private static List<PropertyDefinition> definitions() {
return ImmutableList.of(
- PropertyDefinition.builder(WorkUnitConverter.PROPERTY_HOURS_IN_DAY)
+ PropertyDefinition.builder(TechnicalDebtConverter.PROPERTY_HOURS_IN_DAY)
.name("Number of working hours in a day")
.defaultValue("8")
.category(CoreProperties.CATEGORY_TECHNICAL_DEBT)
diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties b/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties
index 0d03bf4ef1d..4b60157db4b 100644
--- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties
+++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties
@@ -114,7 +114,6 @@ resolution=Resolution
result=Result
results=Results
x_results={0} results
-remediationCost=Remediation Cost
review=Review
reviews=Reviews
review_verb=Review
@@ -528,9 +527,9 @@ issue.component_deleted=Removed
issue.changelog.changed_to={0} changed to {1}
issue.changelog.was=was {0}
issue.changelog.removed={0} removed
-issue.remedation_cost.x_days={0} days
-issue.remedation_cost.x_hours={0} hours
-issue.remedation_cost.x_minutes={0} minutes
+issue.technical_debt.x_days={0} days
+issue.technical_debt.x_hours={0} hours
+issue.technical_debt.x_minutes={0} minutes
#------------------------------------------------------------------------------