diff options
author | Sébastien Lesaint <sebastien.lesaint@sonarsource.com> | 2016-12-01 12:21:21 +0100 |
---|---|---|
committer | Sébastien Lesaint <sebastien.lesaint@sonarsource.com> | 2016-12-01 12:21:21 +0100 |
commit | 03ca01ca4a2feff7d793728de6d300c8ba550599 (patch) | |
tree | 223c91ae3a1b788112eaa05c0c00fd5042dc7081 | |
parent | 3b9c08b11cca8551e545606c79794dd6a4f09952 (diff) | |
parent | 9eebecd84d86c76ea513afc0e50573516c6731b8 (diff) | |
download | sonarqube-03ca01ca4a2feff7d793728de6d300c8ba550599.tar.gz sonarqube-03ca01ca4a2feff7d793728de6d300c8ba550599.zip |
Merge branch 'branch-5.6' into branch-6.2
-rw-r--r-- | server/sonar-server/src/main/java/org/sonar/server/issue/IssueChangelog.java | 10 |
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); } } } |