]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-7473 Drop 'reporter' field from WS
authorJulien Lancelot <julien.lancelot@sonarsource.com>
Wed, 23 Mar 2016 14:40:13 +0000 (15:40 +0100)
committerTeryk Bellahsene <teryk.bellahsene@sonarsource.com>
Tue, 29 Mar 2016 17:10:50 +0000 (19:10 +0200)
17 files changed:
it/it-tests/src/test/java/it/issue/IssueSearchTest.java
server/sonar-server/src/main/java/org/sonar/server/issue/IssueQuery.java
server/sonar-server/src/main/java/org/sonar/server/issue/IssueQueryService.java
server/sonar-server/src/main/java/org/sonar/server/issue/index/IssueIndex.java
server/sonar-server/src/main/java/org/sonar/server/issue/ws/SearchAction.java
server/sonar-server/src/main/java/org/sonar/server/issue/ws/SearchResponseFormat.java
server/sonar-server/src/main/java/org/sonar/server/issue/ws/SearchResponseLoader.java
server/sonar-server/src/test/java/org/sonar/server/issue/IssueQueryServiceTest.java
server/sonar-server/src/test/java/org/sonar/server/issue/IssueQueryTest.java
server/sonar-server/src/test/java/org/sonar/server/issue/index/IssueIndexTest.java
server/sonar-server/src/test/java/org/sonar/server/issue/ws/SearchActionMediumTest.java
server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/load_additional_fields.json
server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/response_contains_all_fields_except_additional_fields.json
sonar-ws/src/main/java/org/sonarqube/ws/client/issue/IssueFilterParameters.java
sonar-ws/src/main/java/org/sonarqube/ws/client/issue/IssuesService.java
sonar-ws/src/main/java/org/sonarqube/ws/client/issue/SearchWsRequest.java
sonar-ws/src/test/java/org/sonarqube/ws/client/issue/SearchWsRequestTest.java

index e553f972530bc44a1dc44b76bf68ba6f1099e899..2c9e187d2710b7151b805c34ead3baa0e3d7acc0 100644 (file)
@@ -61,7 +61,7 @@ public class IssueSearchTest extends AbstractIssueTest {
   private static final String PROJECT_KEY2 = "com.sonarsource.it.samples:multi-modules-sample2";
 
   private static int DEFAULT_PAGINATED_RESULTS = 100;
-  private static int TOTAL_NB_ISSUES = 273;
+  private static int TOTAL_NB_ISSUES = 272;
 
   @BeforeClass
   public static void prepareData() {
@@ -83,15 +83,6 @@ public class IssueSearchTest extends AbstractIssueTest {
 
     // Resolve a issue to test search by status and by resolution
     adminIssueClient().doTransition(searchRandomIssue().key(), "resolve");
-
-    // Create a manual issue to test search by reporter
-    createManualRule();
-    adminIssueClient().create(
-      NewIssue.create().component("com.sonarsource.it.samples:multi-modules-sample:module_a:module_a1:src/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo")
-        .rule("manual:invalidclassname")
-        .line(3)
-        .severity("CRITICAL")
-        .message("The name of the class is invalid"));
   }
 
   @After
@@ -107,8 +98,8 @@ public class IssueSearchTest extends AbstractIssueTest {
   @Test
   public void search_issues_by_component_roots() {
     assertThat(search(IssueQuery.create().componentRoots("com.sonarsource.it.samples:multi-modules-sample")).list()).hasSize(DEFAULT_PAGINATED_RESULTS);
-    assertThat(search(IssueQuery.create().componentRoots("com.sonarsource.it.samples:multi-modules-sample:module_a")).list()).hasSize(83);
-    assertThat(search(IssueQuery.create().componentRoots("com.sonarsource.it.samples:multi-modules-sample:module_a:module_a1")).list()).hasSize(37);
+    assertThat(search(IssueQuery.create().componentRoots("com.sonarsource.it.samples:multi-modules-sample:module_a")).list()).hasSize(82);
+    assertThat(search(IssueQuery.create().componentRoots("com.sonarsource.it.samples:multi-modules-sample:module_a:module_a1")).list()).hasSize(36);
 
     assertThat(search(IssueQuery.create().componentRoots("unknown")).list()).isEmpty();
   }
@@ -117,14 +108,14 @@ public class IssueSearchTest extends AbstractIssueTest {
   public void search_issues_by_components() {
     assertThat(
       search(IssueQuery.create().components("com.sonarsource.it.samples:multi-modules-sample:module_a:module_a1:src/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo")).list())
-      .hasSize(35);
+        .hasSize(34);
     assertThat(search(IssueQuery.create().components("unknown")).list()).isEmpty();
   }
 
   @Test
   public void search_issues_by_severities() {
     assertThat(search(IssueQuery.create().severities("BLOCKER")).list()).hasSize(8);
-    assertThat(search(IssueQuery.create().severities("CRITICAL")).list()).hasSize(9);
+    assertThat(search(IssueQuery.create().severities("CRITICAL")).list()).hasSize(8);
     assertThat(search(IssueQuery.create().severities("MAJOR")).list()).hasSize(DEFAULT_PAGINATED_RESULTS);
     assertThat(search(IssueQuery.create().severities("MINOR")).list()).hasSize(DEFAULT_PAGINATED_RESULTS);
     assertThat(search(IssueQuery.create().severities("INFO")).list()).hasSize(4);
@@ -153,17 +144,10 @@ public class IssueSearchTest extends AbstractIssueTest {
     assertThat(search(IssueQuery.create().assigned(false)).paging().total()).isEqualTo(TOTAL_NB_ISSUES - 1);
   }
 
-  @Test
-  public void search_issues_by_reporters() {
-    assertThat(search(IssueQuery.create().reporters("admin")).list()).hasSize(1);
-    assertThat(search(IssueQuery.create().reporters("unknown")).list()).isEmpty();
-  }
-
   @Test
   public void search_issues_by_rules() {
     assertThat(search(IssueQuery.create().rules("xoo:OneIssuePerLine")).list()).hasSize(DEFAULT_PAGINATED_RESULTS);
     assertThat(search(IssueQuery.create().rules("xoo:OneIssuePerFile")).list()).hasSize(8);
-    assertThat(search(IssueQuery.create().rules("manual:invalidclassname")).list()).hasSize(1);
 
     try {
       assertThat(search(IssueQuery.create().rules("unknown")).list()).isEmpty();
@@ -345,8 +329,7 @@ public class IssueSearchTest extends AbstractIssueTest {
     ORCHESTRATOR.getServer().adminWsClient().post("/api/rules/create", ImmutableMap.<String, Object>of(
       "manual_key", "invalidclassname",
       "name", "InvalidClassName",
-      "markdown_description", "Invalid class name"
-      ));
+      "markdown_description", "Invalid class name"));
   }
 
 }
index ed0c82abd0cefa172cceb064687a51d5e47be7ac..dcaae8b6081035fb3a05fad4cb9ee32dee3b2640 100644 (file)
@@ -66,7 +66,6 @@ public class IssueQuery {
   private final Collection<String> files;
   private final Collection<String> views;
   private final Collection<RuleKey> rules;
-  private final Collection<String> reporters;
   private final Collection<String> assignees;
   private final Collection<String> authors;
   private final Collection<String> languages;
@@ -101,7 +100,6 @@ public class IssueQuery {
     this.files = defaultCollection(builder.files);
     this.views = defaultCollection(builder.views);
     this.rules = defaultCollection(builder.rules);
-    this.reporters = defaultCollection(builder.reporters);
     this.assignees = defaultCollection(builder.assignees);
     this.authors = defaultCollection(builder.authors);
     this.languages = defaultCollection(builder.languages);
@@ -171,10 +169,6 @@ public class IssueQuery {
     return rules;
   }
 
-  public Collection<String> reporters() {
-    return reporters;
-  }
-
   public Collection<String> assignees() {
     return assignees;
   }
@@ -290,7 +284,6 @@ public class IssueQuery {
     private Collection<String> files;
     private Collection<String> views;
     private Collection<RuleKey> rules;
-    private Collection<String> reporters;
     private Collection<String> assignees;
     private Collection<String> authors;
     private Collection<String> languages;
@@ -376,11 +369,6 @@ public class IssueQuery {
       return this;
     }
 
-    public Builder reporters(@Nullable Collection<String> l) {
-      this.reporters = l;
-      return this;
-    }
-
     public Builder assignees(@Nullable Collection<String> l) {
       this.assignees = l;
       return this;
index 8ce9913f876872c801223c5562382ae63eaad499..2dfdc5cf434b4f80fc01f8b8fb8537f0f057e673 100644 (file)
@@ -104,7 +104,6 @@ public class IssueQueryService {
         .resolutions(RubyUtils.toStrings(params.get(IssueFilterParameters.RESOLUTIONS)))
         .resolved(RubyUtils.toBoolean(params.get(IssueFilterParameters.RESOLVED)))
         .rules(toRules(params.get(IssueFilterParameters.RULES)))
-        .reporters(RubyUtils.toStrings(params.get(IssueFilterParameters.REPORTERS)))
         .assignees(buildAssignees(RubyUtils.toStrings(params.get(IssueFilterParameters.ASSIGNEES))))
         .languages(RubyUtils.toStrings(params.get(IssueFilterParameters.LANGUAGES)))
         .tags(RubyUtils.toStrings(params.get(IssueFilterParameters.TAGS)))
@@ -176,7 +175,6 @@ public class IssueQueryService {
         .resolutions(request.getResolutions())
         .resolved(request.getResolved())
         .rules(stringsToRules(request.getRules()))
-        .reporters(request.getReporters())
         .assignees(buildAssignees(request.getAssignees()))
         .languages(request.getLanguages())
         .tags(request.getTags())
index d73764f45c98719e5aed11d75c80ec6886b7999c..945e5061656cb0811839f57081837b12f8d2cad5 100644 (file)
@@ -127,7 +127,9 @@ public class IssueIndex extends BaseIndex {
     LANGUAGES,
     TAGS,
     TYPES,
-    CREATED_AT);
+    CREATED_AT
+  );
+
 
   // TODO to be documented
   // TODO move to Facets ?
@@ -275,7 +277,6 @@ public class IssueIndex extends BaseIndex {
     filters.put(IssueIndexDefinition.FIELD_ISSUE_TAGS, createTermsFilter(IssueIndexDefinition.FIELD_ISSUE_TAGS, query.tags()));
     filters.put(IssueIndexDefinition.FIELD_ISSUE_TYPE, createTermsFilter(IssueIndexDefinition.FIELD_ISSUE_TYPE, query.types()));
     filters.put(IssueIndexDefinition.FIELD_ISSUE_RESOLUTION, createTermsFilter(IssueIndexDefinition.FIELD_ISSUE_RESOLUTION, query.resolutions()));
-    filters.put(IssueIndexDefinition.FIELD_ISSUE_REPORTER, createTermsFilter(IssueIndexDefinition.FIELD_ISSUE_REPORTER, query.reporters()));
     filters.put(IssueIndexDefinition.FIELD_ISSUE_AUTHOR_LOGIN, createTermsFilter(IssueIndexDefinition.FIELD_ISSUE_AUTHOR_LOGIN, query.authors()));
     filters.put(IssueIndexDefinition.FIELD_ISSUE_RULE_KEY, createTermsFilter(IssueIndexDefinition.FIELD_ISSUE_RULE_KEY, query.rules()));
     filters.put(IssueIndexDefinition.FIELD_ISSUE_SEVERITY, createTermsFilter(IssueIndexDefinition.FIELD_ISSUE_SEVERITY, query.severities()));
@@ -404,8 +405,6 @@ public class IssueIndex extends BaseIndex {
         LANGUAGES, IssueIndexDefinition.FIELD_ISSUE_LANGUAGE, query.languages().toArray());
       addSimpleStickyFacetIfNeeded(options, stickyFacetBuilder, esSearch,
         RULES, IssueIndexDefinition.FIELD_ISSUE_RULE_KEY, query.rules().toArray());
-      addSimpleStickyFacetIfNeeded(options, stickyFacetBuilder, esSearch,
-        REPORTERS, IssueIndexDefinition.FIELD_ISSUE_REPORTER);
 
       addSimpleStickyFacetIfNeeded(options, stickyFacetBuilder, esSearch,
         AUTHORS, IssueIndexDefinition.FIELD_ISSUE_AUTHOR_LOGIN, query.authors().toArray());
index 9c8c2827857e9b9faced158e4ceb88411c44c66f..bef890e4a95cb0ededba635f7f04abb9853c4337 100644 (file)
@@ -87,7 +87,6 @@ import static org.sonarqube.ws.client.issue.IssueFilterParameters.PLANNED;
 import static org.sonarqube.ws.client.issue.IssueFilterParameters.PROJECTS;
 import static org.sonarqube.ws.client.issue.IssueFilterParameters.PROJECT_KEYS;
 import static org.sonarqube.ws.client.issue.IssueFilterParameters.PROJECT_UUIDS;
-import static org.sonarqube.ws.client.issue.IssueFilterParameters.REPORTERS;
 import static org.sonarqube.ws.client.issue.IssueFilterParameters.RESOLUTIONS;
 import static org.sonarqube.ws.client.issue.IssueFilterParameters.RESOLVED;
 import static org.sonarqube.ws.client.issue.IssueFilterParameters.RULES;
@@ -125,14 +124,16 @@ public class SearchAction implements IssuesWsAction {
       .setDescription(
         "Search for issues. Requires Browse permission on project(s).<br/>" +
           "Since 5.5, response field 'debt' has been renamed to 'effort'.<br/>" +
-          "Since 5.5, response field 'actionPlan' has been removed")
+          "Since 5.5, response field 'actionPlan' has been removed.<br/>" +
+          "Since 5.5, response field 'reporter' has been removed, as manual issue feature has been dropped")
       .setSince("3.6")
       .setResponseExample(Resources.getResource(this.getClass(), "example-search.json"));
 
     action.addPagingParams(100, MAX_LIMIT);
     action.createParam(Param.FACETS)
       .setDescription("Comma-separated list of the facets to be computed. No facet is computed by default.<br/>" +
-        "Since 5.5, facet 'actionPlans' is deprecated.")
+        "Since 5.5, facet 'actionPlans' is deprecated.<br/>" +
+        "Since 5.5, facet 'reporters' is deprecated.")
       .setPossibleValues(IssueIndex.SUPPORTED_FACETS);
     action.createParam(FACET_MODE)
       .setDefaultValue(FACET_MODE_COUNT)
@@ -182,9 +183,10 @@ public class SearchAction implements IssuesWsAction {
       .setDescription("Since 5.5 this parameter is no more used, as action plan feature has been dropped")
       .setDeprecatedSince("5.5")
       .setBooleanPossibleValues();
-    action.createParam(REPORTERS)
-      .setDescription("Comma-separated list of reporter logins")
-      .setExampleValue("admin");
+    action.createParam("reporters")
+      .setDescription("Since 5.5 this parameter is no more used, as manual issue feature has been dropped")
+      .setExampleValue("admin")
+      .setDeprecatedSince("5.5");
     action.createParam(AUTHORS)
       .setDescription("Comma-separated list of SCM accounts")
       .setExampleValue("torvalds@linux-foundation.org");
@@ -356,7 +358,6 @@ public class SearchAction implements IssuesWsAction {
     }
     addMandatoryValuesToFacet(facets, ASSIGNEES, assignees);
     addMandatoryValuesToFacet(facets, FACET_ASSIGNED_TO_ME, singletonList(userSession.getLogin()));
-    addMandatoryValuesToFacet(facets, REPORTERS, request.getReporters());
     addMandatoryValuesToFacet(facets, RULES, request.getRules());
     addMandatoryValuesToFacet(facets, LANGUAGES, request.getLanguages());
     addMandatoryValuesToFacet(facets, TAGS, request.getTags());
@@ -414,7 +415,6 @@ public class SearchAction implements IssuesWsAction {
     collector.addComponentUuids(facets.getBucketKeys(FILE_UUIDS));
     collector.addComponentUuids(facets.getBucketKeys(MODULE_UUIDS));
     collector.addAll(SearchAdditionalField.USERS, facets.getBucketKeys(ASSIGNEES));
-    collector.addAll(SearchAdditionalField.USERS, facets.getBucketKeys(REPORTERS));
   }
 
   private void collectRequestParams(SearchResponseLoader.Collector collector, SearchWsRequest request) {
@@ -423,7 +423,6 @@ public class SearchAction implements IssuesWsAction {
     collector.addComponentUuids(request.getModuleUuids());
     collector.addComponentUuids(request.getComponentRootUuids());
     collector.addAll(SearchAdditionalField.USERS, request.getAssignees());
-    collector.addAll(SearchAdditionalField.USERS, request.getReporters());
   }
 
   private static SearchWsRequest toSearchWsRequest(Request request) {
@@ -455,7 +454,6 @@ public class SearchAction implements IssuesWsAction {
       .setProjectKeys(request.paramAsStrings(PROJECT_KEYS))
       .setProjectUuids(request.paramAsStrings(PROJECT_UUIDS))
       .setProjects(request.paramAsStrings(PROJECTS))
-      .setReporters(request.paramAsStrings(REPORTERS))
       .setResolutions(request.paramAsStrings(RESOLUTIONS))
       .setResolved(request.paramAsBoolean(RESOLVED))
       .setRules(request.paramAsStrings(RULES))
index d9c58d6c4447d34a1893ea4e59a092eb1e5296da..f3d9f339afb51345fb4f8616995efc72239ac7d8 100644 (file)
@@ -64,7 +64,7 @@ public class SearchResponseFormat {
   }
 
   public Issues.SearchWsResponse formatSearch(Set<SearchAdditionalField> fields, SearchResponseData data,
-                                              Paging paging, @Nullable Facets facets) {
+    Paging paging, @Nullable Facets facets) {
     Issues.SearchWsResponse.Builder response = Issues.SearchWsResponse.newBuilder();
 
     formatPaging(paging, response);
@@ -162,9 +162,6 @@ public class SearchResponseFormat {
     if (!Strings.isNullOrEmpty(dto.getAssignee())) {
       issueBuilder.setAssignee(dto.getAssignee());
     }
-    if (!Strings.isNullOrEmpty(dto.getReporter())) {
-      issueBuilder.setReporter(dto.getReporter());
-    }
     if (!Strings.isNullOrEmpty(dto.getResolution())) {
       issueBuilder.setResolution(dto.getResolution());
     }
index 56a3949a793c9f185a813847475ac88367489148..3a6a78349b274501487ff4f217f3c37739afc69e 100644 (file)
@@ -171,7 +171,6 @@ public class SearchResponseLoader {
         componentUuids.add(issue.getComponentUuid());
         projectUuids.add(issue.getProjectUuid());
         add(RULES, issue.getRuleKey());
-        add(USERS, issue.getReporter());
         add(USERS, issue.getAssignee());
         collectComponentsFromIssueLocations(issue);
       }
index 8a80c76b37eab7c9c69e29c697568a940eea2063..f547dfd01e9cb4112c4651859c6816aced6e7fdc 100644 (file)
@@ -162,7 +162,6 @@ public class IssueQueryServiceTest {
     assertThat(query.projectUuids()).containsOnly("ABCD");
     assertThat(query.moduleUuids()).containsOnly("BCDE");
     assertThat(query.fileUuids()).containsOnly("CDEF");
-    assertThat(query.reporters()).containsOnly("marilyn");
     assertThat(query.assignees()).containsOnly("joanna");
     assertThat(query.languages()).containsOnly("xoo");
     assertThat(query.tags()).containsOnly("tag1", "tag2");
@@ -490,6 +489,6 @@ public class IssueQueryServiceTest {
       .setSinceLeakPeriod(true)
       .setComponentUuids(Collections.singletonList("component-uuid"))
       .setProjectUuids(Collections.singletonList("project-uuid"))
-    );
+      );
   }
 }
index 1811941a0d60e57ae3aa6b166adb6bedfe7e1b51..fbf7d253174e7f0fbe9294ccb286cc6385318dfd 100644 (file)
@@ -45,7 +45,6 @@ public class IssueQueryTest {
       .componentUuids(newArrayList("org/struts/Action.java"))
       .moduleUuids(newArrayList("org.struts:core"))
       .rules(newArrayList(RuleKey.of("squid", "AvoidCycle")))
-      .reporters(newArrayList("crunky"))
       .assignees(newArrayList("gargantua"))
       .languages(newArrayList("xoo"))
       .tags(newArrayList("tag1", "tag2"))
@@ -65,7 +64,6 @@ public class IssueQueryTest {
     assertThat(query.resolutions()).containsOnly(Issue.RESOLUTION_FALSE_POSITIVE);
     assertThat(query.componentUuids()).containsOnly("org/struts/Action.java");
     assertThat(query.moduleUuids()).containsOnly("org.struts:core");
-    assertThat(query.reporters()).containsOnly("crunky");
     assertThat(query.assignees()).containsOnly("gargantua");
     assertThat(query.languages()).containsOnly("xoo");
     assertThat(query.tags()).containsOnly("tag1", "tag2");
@@ -115,7 +113,6 @@ public class IssueQueryTest {
       .moduleUuids(null)
       .statuses(null)
       .assignees(null)
-      .reporters(null)
       .resolutions(null)
       .rules(null)
       .severities(null)
@@ -128,7 +125,6 @@ public class IssueQueryTest {
     assertThat(query.moduleUuids()).isEmpty();
     assertThat(query.statuses()).isEmpty();
     assertThat(query.assignees()).isEmpty();
-    assertThat(query.reporters()).isEmpty();
     assertThat(query.resolutions()).isEmpty();
     assertThat(query.rules()).isEmpty();
     assertThat(query.severities()).isEmpty();
@@ -145,7 +141,6 @@ public class IssueQueryTest {
     assertThat(query.moduleUuids()).isEmpty();
     assertThat(query.statuses()).isEmpty();
     assertThat(query.assignees()).isEmpty();
-    assertThat(query.reporters()).isEmpty();
     assertThat(query.resolutions()).isEmpty();
     assertThat(query.rules()).isEmpty();
     assertThat(query.severities()).isEmpty();
index cccea32a348e5010e23b35b107975fae711376b1..1b23e0870a72285e22f6136be4f11357838b847e 100644 (file)
@@ -202,19 +202,20 @@ public class IssueIndexTest {
 
     assertThat(
       index.search(IssueQuery.builder(userSessionRule).projectUuids(newArrayList(project.uuid())).moduleUuids(newArrayList(file.uuid())).build(), new SearchOptions()).getDocs())
-        .isEmpty();
+      .isEmpty();
     assertThat(
       index.search(IssueQuery.builder(userSessionRule).projectUuids(newArrayList(project.uuid())).moduleUuids(newArrayList(module.uuid())).build(), new SearchOptions()).getDocs())
-        .hasSize(1);
-    assertThat(index.search(IssueQuery.builder(userSessionRule).projectUuids(newArrayList(project.uuid())).moduleUuids(newArrayList(subModule.uuid())).build(), new SearchOptions())
-      .getDocs())
-        .hasSize(2);
+      .hasSize(1);
+    assertThat(
+      index.search(IssueQuery.builder(userSessionRule).projectUuids(newArrayList(project.uuid())).moduleUuids(newArrayList(subModule.uuid())).build(), new SearchOptions())
+        .getDocs())
+      .hasSize(2);
     assertThat(
       index.search(IssueQuery.builder(userSessionRule).projectUuids(newArrayList(project.uuid())).moduleUuids(newArrayList(project.uuid())).build(), new SearchOptions()).getDocs())
-        .isEmpty();
+      .isEmpty();
     assertThat(
       index.search(IssueQuery.builder(userSessionRule).projectUuids(newArrayList(project.uuid())).moduleUuids(newArrayList("unknown")).build(), new SearchOptions()).getDocs())
-        .isEmpty();
+      .isEmpty();
   }
 
   @Test
@@ -428,7 +429,7 @@ public class IssueIndexTest {
 
     assertThat(
       index.search(IssueQuery.builder(userSessionRule).resolutions(newArrayList(Issue.RESOLUTION_FALSE_POSITIVE, Issue.RESOLUTION_FIXED)).build(), new SearchOptions()).getDocs())
-        .hasSize(2);
+      .hasSize(2);
     assertThat(index.search(IssueQuery.builder(userSessionRule).resolutions(newArrayList(Issue.RESOLUTION_FALSE_POSITIVE)).build(), new SearchOptions()).getDocs()).hasSize(1);
     assertThat(index.search(IssueQuery.builder(userSessionRule).resolutions(newArrayList(Issue.RESOLUTION_REMOVED)).build(), new SearchOptions()).getDocs()).isEmpty();
   }
@@ -564,20 +565,6 @@ public class IssueIndexTest {
     assertThat(index.search(IssueQuery.builder(userSessionRule).assigned(null).build(), new SearchOptions()).getDocs()).hasSize(3);
   }
 
-  @Test
-  public void filter_by_reporters() {
-    ComponentDto project = ComponentTesting.newProjectDto();
-    ComponentDto file = ComponentTesting.newFileDto(project);
-
-    indexIssues(
-      IssueTesting.newDoc("ISSUE1", file).setReporter("fabrice"),
-      IssueTesting.newDoc("ISSUE2", file).setReporter("stephane"));
-
-    assertThat(index.search(IssueQuery.builder(userSessionRule).reporters(newArrayList("fabrice", "stephane")).build(), new SearchOptions()).getDocs()).hasSize(2);
-    assertThat(index.search(IssueQuery.builder(userSessionRule).reporters(newArrayList("fabrice")).build(), new SearchOptions()).getDocs()).hasSize(1);
-    assertThat(index.search(IssueQuery.builder(userSessionRule).reporters(newArrayList("unknown")).build(), new SearchOptions()).getDocs()).isEmpty();
-  }
-
   @Test
   public void filter_by_authors() {
     ComponentDto project = ComponentTesting.newProjectDto();
@@ -1047,7 +1034,7 @@ public class IssueIndexTest {
       IssueTesting.newDoc("F1_1", file1).setLine(null),
       IssueTesting.newDoc("F1_3", file1).setLine(25),
 
-    // file F2
+      // file F2
       IssueTesting.newDoc("F2_1", file2).setLine(9),
       IssueTesting.newDoc("F2_2", file2).setLine(109),
       // two issues on the same line -> sort by key
index 91fcecbd36dfe5dbf0c419eeebc7e95811673bf7..aa04415b7d4486915e6996d2abb3f6ac95d3aec5 100644 (file)
@@ -128,7 +128,6 @@ public class SearchActionMediumTest {
       .setSeverity("MAJOR")
       .setAuthorLogin("John")
       .setAssignee("simon")
-      .setReporter("fabrice")
       .setTags(asList("bug", "owasp"))
       .setIssueCreationDate(DateUtils.parseDateTime("2014-09-04T00:00:00+0100"))
       .setIssueUpdateDate(DateUtils.parseDateTime("2017-12-04T00:00:00+0100"));
@@ -222,8 +221,7 @@ public class SearchActionMediumTest {
     IssueDto issue = IssueTesting.newDto(newRule(), file, project)
       .setKee("82fd47d4-b650-4037-80bc-7b112bd4eac2")
       .setAuthorLogin("John")
-      .setAssignee("simon")
-      .setReporter("fabrice");
+      .setAssignee("simon");
     db.issueDao().insert(session, issue);
     session.commit();
     tester.get(IssueIndexer.class).indexAll();
index 4037df580918dddbd28e571e6e57e290efd7e294..c90e5bfaabec1dff452bd27102be382837444333 100644 (file)
@@ -3,7 +3,6 @@
     {
       "key": "82fd47d4-b650-4037-80bc-7b112bd4eac2",
       "assignee": "simon",
-      "reporter": "fabrice",
       "actions": [
         "comment", "assign", "set_tags", "set_type", "assign_to_me"
       ],
     }
   ],
   "users": [
-    {
-      "login": "fabrice",
-      "name": "Fabrice",
-      "email": "fabrice@email.com",
-      "active": true
-    },
     {
       "login": "simon",
       "name": "Simon",
index fd443367ebe1af2c4e88191908cc1bf5e36717cb..dd9da5305447e68adf9172dae2e3d1cef792ead2 100644 (file)
@@ -53,6 +53,11 @@ public class IssueFilterParameters {
    */
   @Deprecated
   public static final String DEPRECATED_ACTION_PLANS = "actionPlans";
+
+  /**
+   * @deprecated since 5.5, manual issue feature has been dropped.
+   */
+  @Deprecated
   public static final String REPORTERS = "reporters";
   public static final String ASSIGNEES = "assignees";
   public static final String AUTHORS = "authors";
index aeb9a126811f1e64b30506183f5e8acbd3c47091..6b2766e45273d9b7641cbf2ea90b67fde29169fc 100644 (file)
@@ -49,7 +49,6 @@ import static org.sonarqube.ws.client.issue.IssueFilterParameters.ON_COMPONENT_O
 import static org.sonarqube.ws.client.issue.IssueFilterParameters.PROJECTS;
 import static org.sonarqube.ws.client.issue.IssueFilterParameters.PROJECT_KEYS;
 import static org.sonarqube.ws.client.issue.IssueFilterParameters.PROJECT_UUIDS;
-import static org.sonarqube.ws.client.issue.IssueFilterParameters.REPORTERS;
 import static org.sonarqube.ws.client.issue.IssueFilterParameters.RESOLUTIONS;
 import static org.sonarqube.ws.client.issue.IssueFilterParameters.RESOLVED;
 import static org.sonarqube.ws.client.issue.IssueFilterParameters.RULES;
@@ -95,7 +94,6 @@ public class IssuesService extends BaseService {
         .setParam(PROJECT_KEYS, inlineMultipleParamValue(request.getProjectKeys()))
         .setParam(PROJECT_UUIDS, inlineMultipleParamValue(request.getProjectUuids()))
         .setParam(PROJECTS, inlineMultipleParamValue(request.getProjects()))
-        .setParam(REPORTERS, inlineMultipleParamValue(request.getReporters()))
         .setParam(RESOLUTIONS, inlineMultipleParamValue(request.getResolutions()))
         .setParam(RESOLVED, request.getResolved())
         .setParam(RULES, inlineMultipleParamValue(request.getRules()))
index 35f4e6d7e4cf56b80a557a2db4ad92969274b615..057eb155e8cf42bd47b3e4ede39f1e2469d5ba1c 100644 (file)
@@ -52,7 +52,6 @@ public class SearchWsRequest {
   private List<String> projectKeys;
   private List<String> projectUuids;
   private List<String> projects;
-  private List<String> reporters;
   private List<String> resolutions;
   private Boolean resolved;
   private List<String> rules;
@@ -303,16 +302,6 @@ public class SearchWsRequest {
     return this;
   }
 
-  @CheckForNull
-  public List<String> getReporters() {
-    return reporters;
-  }
-
-  public SearchWsRequest setReporters(@Nullable List<String> reporters) {
-    this.reporters = reporters;
-    return this;
-  }
-
   @CheckForNull
   public List<String> getResolutions() {
     return resolutions;
index 521dfb190b13a268fbceb7743291ea8927fe08ae..3033d88a72878005ec363fca06ce58f9cf80236b 100644 (file)
@@ -320,22 +320,6 @@ public class SearchWsRequestTest {
     assertThat(underTest.getProjects()).isSameAs(LIST_OF_STRINGS);
   }
 
-  @Test
-  public void getReporters_returns_null_when_SearchWsRequest_has_just_been_instantiated() {
-    assertThat(underTest.getReporters()).isNull();
-  }
-
-  @Test
-  public void setReporters_accepts_null() {
-    underTest.setReporters(null);
-  }
-
-  @Test
-  public void getReporters_returns_object_from_setReporters() {
-    underTest.setReporters(LIST_OF_STRINGS);
-    assertThat(underTest.getReporters()).isSameAs(LIST_OF_STRINGS);
-  }
-
   @Test
   public void getResolutions_returns_null_when_SearchWsRequest_has_just_been_instantiated() {
     assertThat(underTest.getResolutions()).isNull();