From 18a27efe3947f3173c4b5087afba4438cc200a74 Mon Sep 17 00:00:00 2001 From: Teryk Bellahsene Date: Tue, 23 May 2017 14:30:20 +0200 Subject: [PATCH] SONAR-9272 Document with changelog WS api/issues/bulk_change changes --- .../sonar/server/issue/ws/BulkChangeAction.java | 14 +++++--------- .../server/issue/ws/BulkChangeActionTest.java | 2 +- 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.
" + - "Requires authentication.
" + - "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(); } -- 2.39.5