aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-server
diff options
context:
space:
mode:
authorSébastien Lesaint <sebastien.lesaint@sonarsource.com>2016-12-01 12:22:37 +0100
committerSébastien Lesaint <sebastien.lesaint@sonarsource.com>2016-12-01 12:22:37 +0100
commit2f85add5bb0b75a13951c620877a8404318ff602 (patch)
treedc28331864c2a48450f2d59c949d0549b4bd3edc /server/sonar-server
parente5c40e20563c584ed8f6e160b28e2ceefbb44039 (diff)
parentb38069ecab3b9ba05a94469bb8bc515a49bd2405 (diff)
downloadsonarqube-2f85add5bb0b75a13951c620877a8404318ff602.tar.gz
sonarqube-2f85add5bb0b75a13951c620877a8404318ff602.zip
Merge branch 'branch-6.2'
Diffstat (limited to 'server/sonar-server')
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/issue/IssueChangelog.java10
1 files changed, 4 insertions, 6 deletions
diff --git a/server/sonar-server/src/main/java/org/sonar/server/issue/IssueChangelog.java b/server/sonar-server/src/main/java/org/sonar/server/issue/IssueChangelog.java
index d4beab689ad..cdb8db9bf46 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/issue/IssueChangelog.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/issue/IssueChangelog.java
@@ -51,12 +51,10 @@ public class IssueChangelog {
private static void replacedTechnicalDebtByEffort(List<FieldDiffs> changes) {
for (FieldDiffs fieldDiffs : changes) {
Map<String, FieldDiffs.Diff> diffs = fieldDiffs.diffs();
- for (Map.Entry<String, FieldDiffs.Diff> entry : diffs.entrySet()) {
- // As "technicalDebt" couldn't been updated to "effort" in db, we need to convert it here to correctly display "effort" in WS/UI
- if (entry.getKey().equals(IssueUpdater.TECHNICAL_DEBT)) {
- diffs.put("effort", entry.getValue());
- diffs.remove(entry.getKey());
- }
+ if (diffs.containsKey(IssueUpdater.TECHNICAL_DEBT)) {
+ FieldDiffs.Diff value = diffs.get(IssueUpdater.TECHNICAL_DEBT);
+ diffs.remove(IssueUpdater.TECHNICAL_DEBT);
+ diffs.put("effort", value);
}
}
}