diff options
author | Sébastien Lesaint <sebastien.lesaint@sonarsource.com> | 2016-12-01 12:22:37 +0100 |
---|---|---|
committer | Sébastien Lesaint <sebastien.lesaint@sonarsource.com> | 2016-12-01 12:22:37 +0100 |
commit | 2f85add5bb0b75a13951c620877a8404318ff602 (patch) | |
tree | dc28331864c2a48450f2d59c949d0549b4bd3edc /server/sonar-server | |
parent | e5c40e20563c584ed8f6e160b28e2ceefbb44039 (diff) | |
parent | b38069ecab3b9ba05a94469bb8bc515a49bd2405 (diff) | |
download | sonarqube-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.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); } } } |