aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/components/issue
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2015-08-19 09:44:13 +0200
committerStas Vilchik <vilchiks@gmail.com>2015-08-19 09:44:13 +0200
commit5c2ea80547af8ac0b8ac610a840d915fa092a69e (patch)
tree460d8e36da1d5e984cd4fce5635c0a4b51eff959 /server/sonar-web/src/main/js/components/issue
parent157ab0155285444751f45f2a7522259772a71994 (diff)
downloadsonarqube-5c2ea80547af8ac0b8ac610a840d915fa092a69e.tar.gz
sonarqube-5c2ea80547af8ac0b8ac610a840d915fa092a69e.zip
SONAR-6576 do not show secondary locations and execution flows of closed issues
Diffstat (limited to 'server/sonar-web/src/main/js/components/issue')
-rw-r--r--server/sonar-web/src/main/js/components/issue/collections/issues.js10
-rw-r--r--server/sonar-web/src/main/js/components/issue/models/issue.js10
2 files changed, 20 insertions, 0 deletions
diff --git a/server/sonar-web/src/main/js/components/issue/collections/issues.js b/server/sonar-web/src/main/js/components/issue/collections/issues.js
index 248ec44971a..e3cdca48a9e 100644
--- a/server/sonar-web/src/main/js/components/issue/collections/issues.js
+++ b/server/sonar-web/src/main/js/components/issue/collections/issues.js
@@ -25,6 +25,15 @@ define([
return issue;
},
+ _prepareClosed: function (issue) {
+ if (issue.status === 'CLOSED') {
+ issue.secondaryLocations = [];
+ issue.executionFlows = [];
+ delete issue.textRange;
+ }
+ return issue;
+ },
+
parse: function (r) {
var that = this;
@@ -43,6 +52,7 @@ define([
issue = that._injectRelational(issue, r.users, 'assignee', 'login');
issue = that._injectRelational(issue, r.users, 'reporter', 'login');
issue = that._injectRelational(issue, r.actionPlans, 'actionPlan', 'key');
+ issue = that._prepareClosed(issue);
return issue;
});
}
diff --git a/server/sonar-web/src/main/js/components/issue/models/issue.js b/server/sonar-web/src/main/js/components/issue/models/issue.js
index 3ee6036ca33..31f268c958a 100644
--- a/server/sonar-web/src/main/js/components/issue/models/issue.js
+++ b/server/sonar-web/src/main/js/components/issue/models/issue.js
@@ -27,6 +27,7 @@ define(function () {
issue = this._injectRelational(issue, r.users, 'assignee', 'login');
issue = this._injectRelational(issue, r.users, 'reporter', 'login');
issue = this._injectRelational(issue, r.actionPlans, 'actionPlan', 'key');
+ issue = this._prepareClosed(issue);
return issue;
} else {
return r;
@@ -49,6 +50,15 @@ define(function () {
return issue;
},
+ _prepareClosed: function (issue) {
+ if (issue.status === 'CLOSED') {
+ issue.secondaryLocations = [];
+ issue.executionFlows = [];
+ delete issue.textRange;
+ }
+ return issue;
+ },
+
sync: function (method, model, options) {
var opts = options || {};
opts.contentType = 'application/x-www-form-urlencoded';