summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulien Lancelot <julien.lancelot@sonarsource.com>2016-03-23 13:48:51 +0100
committerTeryk Bellahsene <teryk.bellahsene@sonarsource.com>2016-03-29 19:10:49 +0200
commitb3230a0ac2b7263178a31a9bfb816f1bbf7a1033 (patch)
tree6a81f739fc0899c7f5ed4e190fb1922108ebd544
parentdf83affb96f5bc14a070a9fe9f932f53ee91ff54 (diff)
downloadsonarqube-b3230a0ac2b7263178a31a9bfb816f1bbf7a1033.tar.gz
sonarqube-b3230a0ac2b7263178a31a9bfb816f1bbf7a1033.zip
SONAR-7473 Drop 'reporter' field from UI
-rw-r--r--server/sonar-web/src/main/js/apps/issues/facets-view.js2
-rw-r--r--server/sonar-web/src/main/js/apps/issues/models/issues.js1
-rw-r--r--server/sonar-web/src/main/js/apps/issues/models/state.js2
-rw-r--r--server/sonar-web/src/main/js/components/issue/collections/issues.js2
-rw-r--r--server/sonar-web/src/main/js/components/issue/models/issue.js1
-rw-r--r--server/sonar-web/src/main/js/components/issue/templates/issue-changelog.hbs10
-rw-r--r--server/sonar-web/src/main/js/components/navigator/filters/ajax-select-filters.js35
-rw-r--r--server/sonar-web/src/main/js/components/source-viewer/main.js2
-rw-r--r--server/sonar-web/src/main/js/widgets/issue-filter/widget.js10
9 files changed, 6 insertions, 59 deletions
diff --git a/server/sonar-web/src/main/js/apps/issues/facets-view.js b/server/sonar-web/src/main/js/apps/issues/facets-view.js
index ef1f4030170..eef2767bc2e 100644
--- a/server/sonar-web/src/main/js/apps/issues/facets-view.js
+++ b/server/sonar-web/src/main/js/apps/issues/facets-view.js
@@ -30,7 +30,6 @@ import TagFacet from './facets/tag-facet';
import ResolutionFacet from './facets/resolution-facet';
import CreationDateFacet from './facets/creation-date-facet';
import FileFacet from './facets/file-facet';
-import ReporterFacet from './facets/reporter-facet';
import LanguageFacet from './facets/language-facet';
import AuthorFacet from './facets/author-facet';
import IssueKeyFacet from './facets/issue-key-facet';
@@ -49,7 +48,6 @@ const viewsMapping = {
rules: RuleFacet,
tags: TagFacet,
fileUuids: FileFacet,
- reporters: ReporterFacet,
languages: LanguageFacet,
authors: AuthorFacet,
issues: IssueKeyFacet,
diff --git a/server/sonar-web/src/main/js/apps/issues/models/issues.js b/server/sonar-web/src/main/js/apps/issues/models/issues.js
index 6cf78fc7bf6..cf88e28729d 100644
--- a/server/sonar-web/src/main/js/apps/issues/models/issues.js
+++ b/server/sonar-web/src/main/js/apps/issues/models/issues.js
@@ -88,7 +88,6 @@ export default Backbone.Collection.extend({
issue = that._injectRelational(issue, r.components, 'subProject', 'key');
issue = that._injectRelational(issue, r.rules, 'rule', 'key');
issue = that._injectRelational(issue, r.users, 'assignee', 'login');
- issue = that._injectRelational(issue, r.users, 'reporter', 'login');
issue = that._injectCommentsRelational(issue, r.users);
issue = that._prepareClosed(issue);
issue = that.ensureTextRange(issue);
diff --git a/server/sonar-web/src/main/js/apps/issues/models/state.js b/server/sonar-web/src/main/js/apps/issues/models/state.js
index 623ce85bdcf..8c87c0e04f2 100644
--- a/server/sonar-web/src/main/js/apps/issues/models/state.js
+++ b/server/sonar-web/src/main/js/apps/issues/models/state.js
@@ -42,7 +42,6 @@ export default State.extend({
'directories',
'fileUuids',
'assignees',
- 'reporters',
'authors',
'languages'
],
@@ -57,7 +56,6 @@ export default State.extend({
'moduleUuids',
'tags',
'assignees',
- 'reporters',
'authors',
'fileUuids',
'languages',
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 f13415e83d1..bb17e325a8e 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
@@ -95,8 +95,8 @@ export default Backbone.Collection.extend({
issue = that._injectRelational(issue, r.components, 'subProject', 'key');
issue = that._injectRelational(issue, r.rules, 'rule', 'key');
issue = that._injectRelational(issue, r.users, 'assignee', 'login');
- issue = that._injectRelational(issue, r.users, 'reporter', 'login');
issue = that._injectCommentsRelational(issue, r.users);
+ issue = that._injectRelational(issue, r.users, 'reporter', 'login');
issue = that._prepareClosed(issue);
issue = that.ensureTextRange(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 7976ba53449..d860a9c57d1 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
@@ -45,7 +45,6 @@ export default Backbone.Model.extend({
issue = this._injectRelational(issue, r.components, 'subProject', 'key');
issue = this._injectRelational(issue, r.rules, 'rule', 'key');
issue = this._injectRelational(issue, r.users, 'assignee', 'login');
- issue = this._injectRelational(issue, r.users, 'reporter', 'login');
issue = this._injectCommentsRelational(issue, r.users);
issue = this._prepareClosed(issue);
issue = this.ensureTextRange(issue);
diff --git a/server/sonar-web/src/main/js/components/issue/templates/issue-changelog.hbs b/server/sonar-web/src/main/js/components/issue/templates/issue-changelog.hbs
index a50c9de1c8e..e94ba28c14a 100644
--- a/server/sonar-web/src/main/js/components/issue/templates/issue-changelog.hbs
+++ b/server/sonar-web/src/main/js/components/issue/templates/issue-changelog.hbs
@@ -6,14 +6,10 @@
<td class="thin text-left text-top" nowrap>{{dt issue.creationDate}}</td>
<td class="thin text-left text-top" nowrap></td>
<td class="text-left text-top">
- {{#if issue.reporter}}
- {{t 'issue.reported_by'}} {{default issue.reporterName issue.reporter}}
+ {{#if issue.author}}
+ {{t 'created_by'}} {{issue.author}}
{{else}}
- {{#if issue.author}}
- {{t 'created_by'}} {{issue.author}}
- {{else}}
- {{t 'created'}}
- {{/if}}
+ {{t 'created'}}
{{/if}}
</td>
</tr>
diff --git a/server/sonar-web/src/main/js/components/navigator/filters/ajax-select-filters.js b/server/sonar-web/src/main/js/components/navigator/filters/ajax-select-filters.js
index a3402330ef8..4e5bcb8fb00 100644
--- a/server/sonar-web/src/main/js/components/navigator/filters/ajax-select-filters.js
+++ b/server/sonar-web/src/main/js/components/navigator/filters/ajax-select-filters.js
@@ -453,38 +453,6 @@ const AssigneeFilterView = AjaxSelectFilterView.extend({
});
-const ReporterFilterView = AjaxSelectFilterView.extend({
-
- initialize () {
- BaseFilters.BaseFilterView.prototype.initialize.call(this, {
- projectsView: AjaxSelectDetailsFilterView
- });
-
- this.selection = new UserSuggestions();
- this.choices = new UserSuggestions();
- },
-
-
- createRequest (v) {
- const that = this;
- return $
- .ajax({
- url: '/api/users/search',
- type: 'GET',
- data: { q: v }
- })
- .done(function (r) {
- that.choices.add(new Backbone.Model({
- id: r.users[0].login,
- text: r.users[0].name + ' (' + r.users[0].login + ')',
- checked: true
- }));
- });
- }
-
-});
-
-
/*
* Export public classes
*/
@@ -495,8 +463,7 @@ export default {
AjaxSelectFilterView,
ProjectFilterView,
ComponentFilterView,
- AssigneeFilterView,
- ReporterFilterView
+ AssigneeFilterView
};
diff --git a/server/sonar-web/src/main/js/components/source-viewer/main.js b/server/sonar-web/src/main/js/components/source-viewer/main.js
index 78767410b24..1c125e31905 100644
--- a/server/sonar-web/src/main/js/components/source-viewer/main.js
+++ b/server/sonar-web/src/main/js/components/source-viewer/main.js
@@ -283,7 +283,7 @@ export default Marionette.LayoutView.extend({
const options = {
data: {
componentUuids: this.model.id,
- f: 'component,componentId,project,subProject,rule,status,resolution,author,reporter,assignee,debt,' +
+ f: 'component,componentId,project,subProject,rule,status,resolution,author,assignee,debt,' +
'line,message,severity,creationDate,updateDate,closeDate,tags,comments,attr,actions,' +
'transitions',
additionalFields: '_all',
diff --git a/server/sonar-web/src/main/js/widgets/issue-filter/widget.js b/server/sonar-web/src/main/js/widgets/issue-filter/widget.js
index 82cae89822d..343e0be6482 100644
--- a/server/sonar-web/src/main/js/widgets/issue-filter/widget.js
+++ b/server/sonar-web/src/main/js/widgets/issue-filter/widget.js
@@ -154,16 +154,6 @@ const byDistributionConf = {
}
}
},
- 'reporters': {
- label (item, r) {
- if (_.isArray(r.users)) {
- const reporter = _.findWhere(r.users, { login: item.val });
- if (reporter != null) {
- return reporter.name;
- }
- }
- }
- },
'createdAt': {
comparator (item) {
return -moment(item.val).unix();