diff options
author | Stas Vilchik <vilchiks@gmail.com> | 2015-08-19 09:44:13 +0200 |
---|---|---|
committer | Stas Vilchik <vilchiks@gmail.com> | 2015-08-19 09:44:13 +0200 |
commit | 5c2ea80547af8ac0b8ac610a840d915fa092a69e (patch) | |
tree | 460d8e36da1d5e984cd4fce5635c0a4b51eff959 /server/sonar-web/src/main/js/components/issue | |
parent | 157ab0155285444751f45f2a7522259772a71994 (diff) | |
download | sonarqube-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.js | 10 | ||||
-rw-r--r-- | server/sonar-web/src/main/js/components/issue/models/issue.js | 10 |
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'; |