import com.google.common.io.Resources;
import java.util.Date;
+import org.sonar.api.issue.impact.Severity;
import org.sonar.api.server.ws.Change;
import org.sonar.api.server.ws.Request;
import org.sonar.api.server.ws.Response;
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Strings.isNullOrEmpty;
+import static java.lang.String.format;
import static java.util.Objects.requireNonNull;
import static org.sonar.core.issue.IssueChangeContext.issueChangeContextByUserBuilder;
import static org.sonar.core.util.Uuids.UUID_EXAMPLE_01;
"Requires authentication and the following permission: 'Browse' on the project of the specified issue.")
.setSince("3.6")
.setChangelog(
+ new Change("10.8", format("Possible values '%s' and '%s' for response field 'severity' of 'impacts' have been added.", Severity.INFO.name(), Severity.BLOCKER.name())),
new Change("10.4", "The response fields 'severity' and 'type' are deprecated. Please use 'impacts' instead."),
new Change("10.4", "The response fields 'status' and 'resolution' are deprecated. Please use 'issueStatus' instead."),
new Change("10.4", "Add 'issueStatus' field to the response."),
import java.util.Date;
import javax.annotation.CheckForNull;
import javax.annotation.Nullable;
+import org.sonar.api.issue.impact.Severity;
import org.sonar.api.server.ws.Change;
import org.sonar.api.server.ws.Request;
import org.sonar.api.server.ws.Response;
import org.sonar.server.user.UserSession;
import static com.google.common.base.Strings.emptyToNull;
+import static java.lang.String.format;
import static org.sonar.core.issue.IssueChangeContext.issueChangeContextByUserBuilder;
import static org.sonar.server.exceptions.NotFoundException.checkFound;
import static org.sonarqube.ws.client.issue.IssuesWsParameters.ACTION_ASSIGN;
.setDescription("Assign/Unassign an issue. Requires authentication and Browse permission on project")
.setSince("3.6")
.setChangelog(
+ new Change("10.8", format("Possible values '%s' and '%s' for response field 'severity' of 'impacts' have been added.", Severity.INFO.name(), Severity.BLOCKER.name())),
new Change("10.4", "The response fields 'severity' and 'type' are deprecated. Please use 'impacts' instead."),
new Change("10.4", "The response fields 'status' and 'resolution' are deprecated. Please use 'issueStatus' instead."),
new Change("10.4", "Add 'issueStatus' field to the response."),
import com.google.common.io.Resources;
import java.util.Date;
import org.sonar.api.issue.DefaultTransitions;
+import org.sonar.api.issue.impact.Severity;
import org.sonar.api.server.ws.Change;
import org.sonar.api.server.ws.Request;
import org.sonar.api.server.ws.Response;
""".formatted(DefaultTransitions.ACCEPT, DefaultTransitions.WONT_FIX, DefaultTransitions.FALSE_POSITIVE))
.setSince("3.6")
.setChangelog(
+ new Change("10.8", format("Possible values '%s' and '%s' for response field 'severity' of 'impacts' have been added.", Severity.INFO.name(), Severity.BLOCKER.name())),
new Change("10.4", "The transitions '%s' and '%s' are deprecated. Please use '%s' instead. The transition '%s' is deprecated too. "
.formatted(DefaultTransitions.WONT_FIX, DefaultTransitions.CONFIRM, DefaultTransitions.ACCEPT, DefaultTransitions.UNCONFIRM)),
new Change("10.4", "Add transition '%s'.".formatted(DefaultTransitions.ACCEPT)),
import com.google.common.io.Resources;
import java.util.Objects;
+import org.sonar.api.issue.impact.Severity;
import org.sonar.api.server.ws.Change;
import org.sonar.api.server.ws.Request;
import org.sonar.api.server.ws.Response;
"Requires authentication and the following permission: 'Browse' on the project of the specified issue.")
.setSince("3.6")
.setChangelog(
+ new Change("10.8", format("Possible values '%s' and '%s' for response field 'severity' of 'impacts' have been added.", Severity.INFO.name(), Severity.BLOCKER.name())),
new Change("10.4", "The response fields 'severity' and 'type' are deprecated. Please use 'impacts' instead."),
new Change("10.4", "The response fields 'status' and 'resolution' are deprecated. Please use 'issueStatus' instead."),
new Change("10.4", "Add 'issueStatus' field to the response."),
import static org.sonar.api.issue.Issue.STATUS_REOPENED;
import static org.sonar.api.issue.Issue.STATUS_REVIEWED;
import static org.sonar.api.issue.Issue.STATUS_TO_REVIEW;
+import static org.sonar.api.issue.impact.Severity.BLOCKER;
+import static org.sonar.api.issue.impact.Severity.HIGH;
+import static org.sonar.api.issue.impact.Severity.INFO;
+import static org.sonar.api.issue.impact.Severity.MEDIUM;
+import static org.sonar.api.issue.impact.Severity.values;
import static org.sonar.api.server.ws.WebService.Param.FACETS;
import static org.sonar.api.utils.Paging.forPageIndex;
import static org.sonar.server.es.SearchOptions.MAX_PAGE_SIZE;
+ "<br/>When issue indexing is in progress returns 503 service unavailable HTTP code.")
.setSince("3.6")
.setChangelog(
+ new Change("10.8", format("Possible values '%s' and '%s' for response field 'impactSeverities' of 'facets' have been added.", INFO.name(), BLOCKER.name())),
+ new Change("10.8", format("Possible values '%s' and '%s' for response field 'severity' of 'impacts' have been added.", INFO.name(), BLOCKER.name())),
+ new Change("10.8", format("Parameter '%s' now supports values: '%s','%s'.", PARAM_SEVERITIES, INFO.name(), BLOCKER.name())),
new Change("10.7", format(NEW_FACET_ADDED_MESSAGE, PARAM_CASA)),
new Change("10.7", format(NEW_PARAM_ADDED_MESSAGE, PARAM_CASA)),
new Change("10.7", format(NEW_FACET_ADDED_MESSAGE, PARAM_STIG_ASD_V5R3)),
action.createParam(PARAM_IMPACT_SEVERITIES)
.setSince("10.2")
.setDescription("Comma-separated list of Software Quality Severities")
- .setExampleValue(org.sonar.api.issue.impact.Severity.HIGH + "," + org.sonar.api.issue.impact.Severity.MEDIUM)
- .setPossibleValues(org.sonar.api.issue.impact.Severity.values());
+ .setExampleValue(HIGH + "," + MEDIUM)
+ .setPossibleValues(values());
action.createParam(PARAM_CLEAN_CODE_ATTRIBUTE_CATEGORIES)
.setSince("10.2")
.setDescription("Comma-separated list of Clean Code Attribute Categories")
addMandatoryValuesToFacet(facets, PARAM_SEVERITIES, Severity.ALL);
addMandatoryValuesToFacet(facets, PARAM_STATUSES, ISSUE_STATUSES);
addMandatoryValuesToFacet(facets, PARAM_IMPACT_SOFTWARE_QUALITIES, enumToStringCollection(SoftwareQuality.values()));
- addMandatoryValuesToFacet(facets, PARAM_IMPACT_SEVERITIES, enumToStringCollection(org.sonar.api.issue.impact.Severity.values()));
+ addMandatoryValuesToFacet(facets, PARAM_IMPACT_SEVERITIES, enumToStringCollection(values()));
addMandatoryValuesToFacet(facets, PARAM_CLEAN_CODE_ATTRIBUTE_CATEGORIES, enumToStringCollection(CleanCodeAttributeCategory.values()));
addMandatoryValuesToFacet(facets, PARAM_RESOLUTIONS, concat(singletonList(""), RESOLUTIONS));
import java.util.Collections;
import java.util.Date;
import java.util.List;
+import org.sonar.api.issue.impact.Severity;
import org.sonar.api.server.ws.Change;
import org.sonar.api.server.ws.Request;
import org.sonar.api.server.ws.Response;
import org.sonar.server.issue.IssueFinder;
import org.sonar.server.user.UserSession;
+import static java.lang.String.format;
import static org.sonar.core.issue.IssueChangeContext.issueChangeContextByUserBuilder;
import static org.sonarqube.ws.client.issue.IssuesWsParameters.ACTION_SET_TAGS;
import static org.sonarqube.ws.client.issue.IssuesWsParameters.PARAM_ISSUE;
private final OperationResponseWriter responseWriter;
public SetTagsAction(UserSession userSession, DbClient dbClient, IssueFinder issueFinder, IssueFieldsSetter issueFieldsSetter, IssueUpdater issueUpdater,
- OperationResponseWriter responseWriter) {
+ OperationResponseWriter responseWriter) {
this.userSession = userSession;
this.dbClient = dbClient;
this.issueFinder = issueFinder;
.setDescription("Set tags on an issue. <br/>" +
"Requires authentication and Browse permission on project")
.setChangelog(
+ new Change("10.8", format("Possible values '%s' and '%s' for response field 'severity' of 'impacts' have been added.", Severity.INFO.name(), Severity.BLOCKER.name())),
new Change("10.4", "The response fields 'severity' and 'type' are deprecated. Please use 'impacts' instead."),
new Change("10.4", "The response fields 'status' and 'resolution' are deprecated. Please use 'issueStatus' instead."),
new Change("10.4", "Add 'issueStatus' field to the response."),
import org.sonar.db.user.UserDto;
import static java.lang.String.format;
+import static org.sonar.api.issue.impact.Severity.BLOCKER;
+import static org.sonar.api.issue.impact.Severity.INFO;
import static org.sonar.api.utils.DateUtils.parseEndingDateOrDateTime;
import static org.sonar.api.utils.DateUtils.parseStartingDateOrDateTime;
import static org.sonar.server.es.SearchOptions.MAX_PAGE_SIZE;
new Change("10.3", "Added fields 'oldCleanCodeAttribute', 'newCleanCodeAttribute', 'oldCleanCodeAttributeCategory', " +
"'newCleanCodeAttributeCategory' and 'impactChanges' to 'params' section of response"),
new Change("10.3", "Added field 'sonarQubeVersion' to 'params' section of response"),
- new Change("10.8", format("Added parameter '%s'", PARAM_FILTER_MODE)))
+ new Change("10.8", format("Added parameter '%s'", PARAM_FILTER_MODE)),
+ new Change("10.8", format("Possible values '%s' and '%s' for response field 'severity' of 'impacts' have been added", INFO.name(), BLOCKER.name())))
.setHandler(this)
.setResponseExample(getClass().getResource("changelog-example.json"));
json
.prop("oldCleanCodeAttribute", nameOrNull(ruleChange.getOldCleanCodeAttribute()))
.prop("newCleanCodeAttribute", nameOrNull(ruleChange.getNewCleanCodeAttribute()))
- .prop("oldCleanCodeAttributeCategory", ruleChange.getOldCleanCodeAttribute() == null ? null :
- nameOrNull(ruleChange.getOldCleanCodeAttribute().getAttributeCategory()))
- .prop("newCleanCodeAttributeCategory", ruleChange.getNewCleanCodeAttribute() == null ? null :
- nameOrNull(ruleChange.getNewCleanCodeAttribute().getAttributeCategory()));
+ .prop("oldCleanCodeAttributeCategory", ruleChange.getOldCleanCodeAttribute() == null ? null : nameOrNull(ruleChange.getOldCleanCodeAttribute().getAttributeCategory()))
+ .prop("newCleanCodeAttributeCategory", ruleChange.getNewCleanCodeAttribute() == null ? null : nameOrNull(ruleChange.getNewCleanCodeAttribute().getAttributeCategory()));
if (ruleChange.getRuleImpactChanges() != null) {
json.name("impactChanges").beginArray();
import org.sonar.server.qualityprofile.QProfileComparison.QProfileComparisonResult;
import static com.google.common.base.Preconditions.checkArgument;
+import static java.lang.String.format;
+import static org.sonar.api.issue.impact.Severity.BLOCKER;
+import static org.sonar.api.issue.impact.Severity.INFO;
import static org.sonar.core.util.Uuids.UUID_EXAMPLE_01;
import static org.sonar.core.util.Uuids.UUID_EXAMPLE_02;
new Change("10.3", String.format("Added '%s' and '%s' fields", ATTRIBUTE_CLEAN_CODE_ATTRIBUTE_CATEGORY, ATTRIBUTE_IMPACTS)),
new Change("10.3", String.format("Dropped '%s' field from '%s', '%s' and '%s' objects",
ATTRIBUTE_SEVERITY, ATTRIBUTE_SAME, ATTRIBUTE_IN_LEFT, ATTRIBUTE_IN_RIGHT)),
- new Change("10.8", "'impacts' are part of the 'left' and 'right' sections of the 'modified' array"));
+ new Change("10.8", "'impacts' are part of the 'left' and 'right' sections of the 'modified' array"),
+ new Change("10.8", format("Possible values '%s' and '%s' for response field 'severity' of 'impacts' have been added", INFO.name(), BLOCKER.name())));
compare.createParam(PARAM_LEFT_KEY)
.setDescription("Profile key.")
json.name(ATTRIBUTE_LEFT).beginObject();
json.prop(ATTRIBUTE_SEVERITY, value.leftSeverity());
-
List<ImpactDto> leftImpacts = getLeftImpactDtos(value);
json.name(ATTRIBUTE_IMPACTS);
json.beginArray();
import org.sonarqube.ws.Common;
import org.sonarqube.ws.Rules;
import org.sonarqube.ws.Rules.SearchResponse;
+import org.sonarqube.ws.client.issue.IssuesWsParameters;
import static java.lang.String.format;
+import static org.sonar.api.issue.impact.Severity.BLOCKER;
+import static org.sonar.api.issue.impact.Severity.INFO;
import static org.sonar.api.server.ws.WebService.Param.ASCENDING;
import static org.sonar.api.server.ws.WebService.Param.FACETS;
import static org.sonar.api.server.ws.WebService.Param.FIELDS;
.addPagingParams(100, MAX_PAGE_SIZE)
.setHandler(this)
.setChangelog(
+ new Change("10.8", format("Possible values '%s' and '%s' for response field 'impactSeverities' of 'facets' have been added", INFO.name(), BLOCKER.name())),
+ new Change("10.8", format("Possible values '%s' and '%s' for response field 'severity' of 'impacts' have been added", INFO.name(), BLOCKER.name())),
+ new Change("10.8", format("Parameter '%s' now supports values: '%s','%s'", IssuesWsParameters.PARAM_SEVERITIES, INFO.name(), BLOCKER.name())),
new Change("10.6", format("Parameter '%s has been added", PARAM_PRIORITIZED_RULE)),
new Change("5.5", "The field 'effortToFixDescription' has been deprecated, use 'gapDescription' instead"),
new Change("5.5", "The field 'debtRemFnCoeff' has been deprecated, use 'remFnGapMultiplier' instead"),
import static java.lang.String.format;
import static java.util.Collections.singletonList;
import static java.util.Optional.ofNullable;
+import static org.sonar.api.issue.impact.Severity.BLOCKER;
+import static org.sonar.api.issue.impact.Severity.INFO;
import static org.sonar.server.ws.WsUtils.writeProtobuf;
/**
new Change("10.0", "The field 'defaultDebtRemFnType' has been deprecated, use 'defaultRemFnType' instead"),
new Change("10.0", "The field 'debtRemFnType' has been deprecated, use 'remFnType' instead"),
new Change("10.2", "Add 'impacts', 'cleanCodeAttribute', 'cleanCodeAttributeCategory' fields to the response"),
- new Change("10.2", "The field 'severity' and 'type' in the response have been deprecated, use 'impacts' instead."));
+ new Change("10.2", "The field 'severity' and 'type' in the response have been deprecated, use 'impacts' instead."),
+ new Change("10.8", format("Possible values '%s' and '%s' for response field 'severity' of 'impacts' have been added.", INFO.name(), BLOCKER.name()))
+
+ );
action
.createParam(PARAM_KEY)