aboutsummaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorTeryk Bellahsene <teryk.bellahsene@sonarsource.com>2017-05-23 14:30:20 +0200
committerTeryk Bellahsene <teryk.bellahsene@sonarsource.com>2017-05-24 16:10:07 +0200
commit18a27efe3947f3173c4b5087afba4438cc200a74 (patch)
tree97eae7e5a80cfd75ec6602a6ed098edd5aa72ada /server
parentded7a2f9b284345e15c38fa7504d11a6419d7875 (diff)
downloadsonarqube-18a27efe3947f3173c4b5087afba4438cc200a74.tar.gz
sonarqube-18a27efe3947f3173c4b5087afba4438cc200a74.zip
SONAR-9272 Document with changelog WS api/issues/bulk_change changes
Diffstat (limited to 'server')
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/issue/ws/BulkChangeAction.java14
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/issue/ws/BulkChangeActionTest.java2
2 files changed, 6 insertions, 10 deletions
diff --git a/server/sonar-server/src/main/java/org/sonar/server/issue/ws/BulkChangeAction.java b/server/sonar-server/src/main/java/org/sonar/server/issue/ws/BulkChangeAction.java
index 573c6c83e9b..a46c453ce4c 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/issue/ws/BulkChangeAction.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/issue/ws/BulkChangeAction.java
@@ -19,7 +19,6 @@
*/
package org.sonar.server.issue.ws;
-import com.google.common.io.Resources;
import java.util.Collection;
import java.util.Date;
import java.util.HashMap;
@@ -36,6 +35,7 @@ import org.sonar.api.issue.DefaultTransitions;
import org.sonar.api.rule.RuleKey;
import org.sonar.api.rule.Severity;
import org.sonar.api.rules.RuleType;
+import org.sonar.api.server.ws.Change;
import org.sonar.api.server.ws.Request;
import org.sonar.api.server.ws.Response;
import org.sonar.api.server.ws.WebService;
@@ -84,7 +84,6 @@ import static org.sonar.server.issue.TransitionAction.DO_TRANSITION_KEY;
import static org.sonar.server.issue.TransitionAction.TRANSITION_PARAMETER;
import static org.sonar.server.ws.WsUtils.writeProtobuf;
import static org.sonarqube.ws.client.issue.IssuesWsParameters.ACTION_BULK_CHANGE;
-import static org.sonarqube.ws.client.issue.IssuesWsParameters.PARAM_ACTIONS;
import static org.sonarqube.ws.client.issue.IssuesWsParameters.PARAM_ADD_TAGS;
import static org.sonarqube.ws.client.issue.IssuesWsParameters.PARAM_ASSIGN;
import static org.sonarqube.ws.client.issue.IssuesWsParameters.PARAM_COMMENT;
@@ -120,21 +119,18 @@ public class BulkChangeAction implements IssuesWsAction {
public void define(WebService.NewController context) {
WebService.NewAction action = context.createAction(ACTION_BULK_CHANGE)
.setDescription("Bulk change on issues.<br/>" +
- "Requires authentication.<br/>" +
- "Since 6.3, 'actions' parameter is useless.")
+ "Requires authentication.")
.setSince("3.7")
+ .setChangelog(
+ new Change("6.3", "'actions' parameter is ignored"))
.setHandler(this)
- .setResponseExample(Resources.getResource(this.getClass(), "bulk_change-example.json"))
+ .setResponseExample(getClass().getResource("bulk_change-example.json"))
.setPost(true);
action.createParam(PARAM_ISSUES)
.setDescription("Comma-separated list of issue keys")
.setRequired(true)
.setExampleValue(UUID_EXAMPLE_01 + "," + UUID_EXAMPLE_02);
- action.createParam(PARAM_ACTIONS)
- .setDescription("No more needed since version 6.3")
- .setDeprecatedSince("6.3")
- .setExampleValue("assign,set_severity");
action.createParam(PARAM_ASSIGN)
.setDescription("To assign the list of issues to a specific user (login), or un-assign all the issues")
.setExampleValue("john.smith")
diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/ws/BulkChangeActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/ws/BulkChangeActionTest.java
index daf8308bb58..0af455960ad 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/issue/ws/BulkChangeActionTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/issue/ws/BulkChangeActionTest.java
@@ -457,7 +457,7 @@ public class BulkChangeActionTest {
assertThat(action.key()).isEqualTo("bulk_change");
assertThat(action.isPost()).isTrue();
assertThat(action.isInternal()).isFalse();
- assertThat(action.params()).hasSize(11);
+ assertThat(action.params()).hasSize(10);
assertThat(action.responseExample()).isNotNull();
}