The ability to change issue type is also available from api/issues/bulk_changetags/5.5-M10
@@ -87,6 +87,7 @@ public class ActionService { | |||
if (issue.resolution() == null) { | |||
availableActions.add("assign"); | |||
availableActions.add("set_tags"); | |||
availableActions.add("set_type"); | |||
if (!login.equals(issue.assignee())) { | |||
availableActions.add("assign_to_me"); | |||
} |
@@ -220,7 +220,7 @@ public class IssueService { | |||
DbSession session = dbClient.openSession(false); | |||
try { | |||
DefaultIssue issue = getByKeyForUpdate(session, issueKey).toDefaultIssue(); | |||
userSession.checkComponentPermission(UserRole.ISSUE_ADMIN, issue.projectKey()); | |||
userSession.checkComponentUuidPermission(UserRole.ISSUE_ADMIN, issue.projectUuid()); | |||
IssueChangeContext context = IssueChangeContext.createUser(new Date(), userSession.getLogin()); | |||
if (issueUpdater.setManualSeverity(issue, severity, context)) { | |||
@@ -231,6 +231,23 @@ public class IssueService { | |||
} | |||
} | |||
public void setType(String issueKey, RuleType type) { | |||
userSession.checkLoggedIn(); | |||
DbSession session = dbClient.openSession(false); | |||
try { | |||
DefaultIssue issue = getByKeyForUpdate(session, issueKey).toDefaultIssue(); | |||
userSession.checkComponentUuidPermission(UserRole.ISSUE_ADMIN, issue.projectUuid()); | |||
IssueChangeContext context = IssueChangeContext.createUser(new Date(), userSession.getLogin()); | |||
if (issueUpdater.setType(issue, type, context)) { | |||
saveIssue(session, issue, context, null); | |||
} | |||
} finally { | |||
session.close(); | |||
} | |||
} | |||
public Issue createManualIssue(String componentKey, RuleKey ruleKey, @Nullable Integer line, @Nullable String message, @Nullable String severity) { | |||
userSession.checkLoggedIn(); | |||
@@ -33,6 +33,7 @@ import javax.annotation.Nullable; | |||
import org.apache.commons.lang.StringUtils; | |||
import org.apache.commons.lang.time.DateUtils; | |||
import org.sonar.api.issue.ActionPlan; | |||
import org.sonar.api.rules.RuleType; | |||
import org.sonar.api.server.ServerSide; | |||
import org.sonar.api.server.rule.RuleTagFormat; | |||
import org.sonar.api.user.User; | |||
@@ -52,6 +53,7 @@ public class IssueUpdater { | |||
public static final String UNUSED = ""; | |||
public static final String SEVERITY = "severity"; | |||
public static final String TYPE = "type"; | |||
public static final String ASSIGNEE = "assignee"; | |||
public static final String RESOLUTION = "resolution"; | |||
public static final String STATUS = "status"; | |||
@@ -62,6 +64,17 @@ public class IssueUpdater { | |||
private static final Joiner CHANGELOG_TAG_JOINER = Joiner.on(" ").skipNulls(); | |||
public boolean setType(DefaultIssue issue, RuleType type, IssueChangeContext context) { | |||
if (!Objects.equal(type, issue.type())) { | |||
issue.setFieldChange(context, TYPE, issue.type(), type); | |||
issue.setType(type); | |||
issue.setUpdateDate(context.date()); | |||
issue.setChanged(true); | |||
return true; | |||
} | |||
return false; | |||
} | |||
public boolean setSeverity(DefaultIssue issue, String severity, IssueChangeContext context) { | |||
if (issue.manualSeverity()) { | |||
throw new IllegalStateException("Severity can't be changed"); |
@@ -0,0 +1,64 @@ | |||
/* | |||
* SonarQube | |||
* Copyright (C) 2009-2016 SonarSource SA | |||
* mailto:contact AT sonarsource DOT com | |||
* | |||
* This program is free software; you can redistribute it and/or | |||
* modify it under the terms of the GNU Lesser General Public | |||
* License as published by the Free Software Foundation; either | |||
* version 3 of the License, or (at your option) any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |||
* Lesser General Public License for more details. | |||
* | |||
* You should have received a copy of the GNU Lesser General Public License | |||
* along with this program; if not, write to the Free Software Foundation, | |||
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | |||
*/ | |||
package org.sonar.server.issue; | |||
import com.google.common.base.Preconditions; | |||
import java.util.Collection; | |||
import java.util.Map; | |||
import org.sonar.api.issue.Issue; | |||
import org.sonar.api.issue.condition.IsUnResolved; | |||
import org.sonar.api.rules.RuleType; | |||
import org.sonar.core.issue.DefaultIssue; | |||
import org.sonar.server.user.UserSession; | |||
import static com.google.common.base.Strings.isNullOrEmpty; | |||
public class SetTypeAction extends Action { | |||
private static final String SET_TYPE_KEY = "set_type"; | |||
private static final String TYPE_PARAMETER = "type"; | |||
private final IssueUpdater issueUpdater; | |||
public SetTypeAction(IssueUpdater issueUpdater) { | |||
super(SET_TYPE_KEY); | |||
this.issueUpdater = issueUpdater; | |||
super.setConditions(new IsUnResolved()); | |||
} | |||
@Override | |||
public boolean verify(Map<String, Object> properties, Collection<Issue> issues, UserSession userSession) { | |||
newValue(properties); | |||
return true; | |||
} | |||
@Override | |||
public boolean execute(Map<String, Object> properties, Context context) { | |||
String type = newValue(properties); | |||
return issueUpdater.setType((DefaultIssue) context.issue(), RuleType.valueOf(type), context.issueChangeContext()); | |||
} | |||
private static String newValue(Map<String, Object> properties) { | |||
String type = (String) properties.get(TYPE_PARAMETER); | |||
Preconditions.checkArgument(!isNullOrEmpty(type), "Missing parameter: '%s'", TYPE_PARAMETER); | |||
Preconditions.checkArgument(RuleType.ALL_NAMES.contains(type), "Unknown type: %s", type); | |||
return type; | |||
} | |||
} |
@@ -37,6 +37,7 @@ public class IssueWsModule extends Module { | |||
SetSeverityAction.class, | |||
TagsAction.class, | |||
SetTagsAction.class, | |||
SetTypeAction.class, | |||
ComponentTagsAction.class, | |||
AuthorsAction.class); | |||
} |
@@ -22,6 +22,7 @@ package org.sonar.server.issue.ws; | |||
import com.google.common.io.Resources; | |||
import org.sonar.api.issue.DefaultTransitions; | |||
import org.sonar.api.rule.Severity; | |||
import org.sonar.api.rules.RuleType; | |||
import org.sonar.api.server.ws.RailsHandler; | |||
import org.sonar.api.server.ws.WebService; | |||
@@ -161,6 +162,11 @@ public class IssuesWs implements WebService { | |||
.setDescription("To change the severity of the list of issues") | |||
.setExampleValue(Severity.BLOCKER) | |||
.setPossibleValues(Severity.ALL); | |||
action.createParam("set_type.type") | |||
.setDescription("To change the type of the list of issues") | |||
.setExampleValue(RuleType.BUG) | |||
.setPossibleValues(RuleType.ALL_NAMES) | |||
.setSince("5.5"); | |||
action.createParam("plan.plan") | |||
.setDescription("To plan the list of issues to a specific action plan (key), or unlink all the issues from an action plan") | |||
.setExampleValue("3f19de90-1521-4482-a737-a311758ff513"); |
@@ -0,0 +1,66 @@ | |||
/* | |||
* SonarQube | |||
* Copyright (C) 2009-2016 SonarSource SA | |||
* mailto:contact AT sonarsource DOT com | |||
* | |||
* This program is free software; you can redistribute it and/or | |||
* modify it under the terms of the GNU Lesser General Public | |||
* License as published by the Free Software Foundation; either | |||
* version 3 of the License, or (at your option) any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |||
* Lesser General Public License for more details. | |||
* | |||
* You should have received a copy of the GNU Lesser General Public License | |||
* along with this program; if not, write to the Free Software Foundation, | |||
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | |||
*/ | |||
package org.sonar.server.issue.ws; | |||
import org.sonar.api.rules.RuleType; | |||
import org.sonar.api.server.ws.Request; | |||
import org.sonar.api.server.ws.Response; | |||
import org.sonar.api.server.ws.WebService; | |||
import org.sonar.core.util.Uuids; | |||
import org.sonar.server.issue.IssueService; | |||
public class SetTypeAction implements IssuesWsAction { | |||
public static final String ACTION = "set_type"; | |||
private final IssueService issueService; | |||
private final OperationResponseWriter responseWriter; | |||
public SetTypeAction(IssueService issueService, OperationResponseWriter responseWriter) { | |||
this.issueService = issueService; | |||
this.responseWriter = responseWriter; | |||
} | |||
@Override | |||
public void define(WebService.NewController controller) { | |||
WebService.NewAction action = controller.createAction(ACTION) | |||
.setDescription("Change type of issue, for instance from 'code smell' to 'bug'. Requires authentication and Browse permission on project.") | |||
.setSince("5.5") | |||
.setHandler(this) | |||
.setPost(true); | |||
action.createParam("issue") | |||
.setDescription("Key of the issue") | |||
.setRequired(true) | |||
.setExampleValue(Uuids.UUID_EXAMPLE_01); | |||
action.createParam("type") | |||
.setDescription("New type") | |||
.setRequired(true) | |||
.setPossibleValues(RuleType.ALL_NAMES); | |||
} | |||
@Override | |||
public void handle(Request request, Response response) throws Exception { | |||
String key = request.mandatoryParam("issue"); | |||
issueService.setType(key, RuleType.valueOf(request.mandatoryParam("type"))); | |||
responseWriter.write(key, request, response); | |||
} | |||
} |
@@ -31,6 +31,7 @@ import org.sonar.api.rules.AnnotationRuleParser; | |||
import org.sonar.api.rules.XMLRuleParser; | |||
import org.sonar.api.server.rule.RulesDefinitionXmlLoader; | |||
import org.sonar.core.component.DefaultResourceTypes; | |||
import org.sonar.server.issue.SetTypeAction; | |||
import org.sonar.server.issue.IssueUpdater; | |||
import org.sonar.server.issue.workflow.FunctionExecutor; | |||
import org.sonar.server.issue.workflow.IssueWorkflow; | |||
@@ -613,6 +614,7 @@ public class PlatformLevel4 extends PlatformLevel { | |||
// issues actions | |||
AssignAction.class, | |||
SetTypeAction.class, | |||
PlanAction.class, | |||
SetSeverityAction.class, | |||
CommentAction.class, |
@@ -170,13 +170,13 @@ public class ActionServiceTest { | |||
@Test | |||
public void return_provided_actions_without_set_severity_when_not_issue_admin() { | |||
assertThat(actionService.listAvailableActions(issue.toDefaultIssue())).containsOnly("comment", "assign", "set_tags", "assign_to_me", "plan"); | |||
assertThat(actionService.listAvailableActions(issue.toDefaultIssue())).containsOnly("comment", "assign", "set_tags", "set_type", "assign_to_me", "plan"); | |||
} | |||
@Test | |||
public void return_provided_actions_with_set_severity_when_issue_admin() { | |||
userSession.addProjectUuidPermissions(ISSUE_ADMIN, PROJECT_UUID); | |||
assertThat(actionService.listAvailableActions(issue.toDefaultIssue())).containsOnly("comment", "assign", "set_tags", "assign_to_me", "plan", "set_severity"); | |||
assertThat(actionService.listAvailableActions(issue.toDefaultIssue())).containsOnly("comment", "assign", "set_tags", "set_type", "assign_to_me", "plan", "set_severity"); | |||
} | |||
@Test |
@@ -35,6 +35,7 @@ import org.sonar.api.issue.Issue; | |||
import org.sonar.api.rule.RuleKey; | |||
import org.sonar.api.rule.RuleStatus; | |||
import org.sonar.api.rule.Severity; | |||
import org.sonar.api.rules.RuleType; | |||
import org.sonar.api.security.DefaultGroups; | |||
import org.sonar.api.web.UserRole; | |||
import org.sonar.core.permission.GlobalPermissions; | |||
@@ -291,7 +292,7 @@ public class IssueServiceMediumTest { | |||
RuleDto rule = newRule(); | |||
ComponentDto project = newProject(); | |||
ComponentDto file = newFile(project); | |||
userSessionRule.login("john").addProjectPermissions(UserRole.ISSUE_ADMIN, project.key()); | |||
userSessionRule.login("john").addProjectUuidPermissions(UserRole.ISSUE_ADMIN, project.uuid()); | |||
IssueDto issue = saveIssue(IssueTesting.newDto(rule, file, project).setSeverity(Severity.BLOCKER)); | |||
@@ -302,6 +303,22 @@ public class IssueServiceMediumTest { | |||
assertThat(IssueIndex.getByKey(issue.getKey()).severity()).isEqualTo(Severity.MINOR); | |||
} | |||
@Test | |||
public void set_type() { | |||
RuleDto rule = newRule(); | |||
ComponentDto project = newProject(); | |||
ComponentDto file = newFile(project); | |||
userSessionRule.login("john").addProjectUuidPermissions(UserRole.ISSUE_ADMIN, project.uuid()); | |||
IssueDto issue = saveIssue(IssueTesting.newDto(rule, file, project).setType(RuleType.CODE_SMELL)); | |||
assertThat(IssueIndex.getByKey(issue.getKey()).type()).isEqualTo(RuleType.CODE_SMELL); | |||
service.setType(issue.getKey(), RuleType.BUG); | |||
assertThat(IssueIndex.getByKey(issue.getKey()).type()).isEqualTo(RuleType.BUG); | |||
} | |||
@Test | |||
public void create_manual_issue() { | |||
ComponentDto project = newProject(); |
@@ -0,0 +1,92 @@ | |||
/* | |||
* SonarQube | |||
* Copyright (C) 2009-2016 SonarSource SA | |||
* mailto:contact AT sonarsource DOT com | |||
* | |||
* This program is free software; you can redistribute it and/or | |||
* modify it under the terms of the GNU Lesser General Public | |||
* License as published by the Free Software Foundation; either | |||
* version 3 of the License, or (at your option) any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |||
* Lesser General Public License for more details. | |||
* | |||
* You should have received a copy of the GNU Lesser General Public License | |||
* along with this program; if not, write to the Free Software Foundation, | |||
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | |||
*/ | |||
package org.sonar.server.issue; | |||
import com.google.common.collect.Lists; | |||
import java.util.Map; | |||
import org.junit.Before; | |||
import org.junit.Rule; | |||
import org.junit.Test; | |||
import org.sonar.api.issue.Issue; | |||
import org.sonar.api.rules.RuleType; | |||
import org.sonar.core.issue.DefaultIssue; | |||
import org.sonar.core.issue.IssueChangeContext; | |||
import org.sonar.server.tester.AnonymousMockUserSession; | |||
import org.sonar.server.tester.UserSessionRule; | |||
import org.sonar.server.user.UserSession; | |||
import static com.google.common.collect.Maps.newHashMap; | |||
import static org.assertj.core.api.Assertions.assertThat; | |||
import static org.junit.Assert.fail; | |||
import static org.mockito.Matchers.any; | |||
import static org.mockito.Matchers.eq; | |||
import static org.mockito.Mockito.mock; | |||
import static org.mockito.Mockito.verify; | |||
import static org.mockito.Mockito.verifyZeroInteractions; | |||
import static org.mockito.Mockito.when; | |||
public class SetTypeActionTest { | |||
@Rule | |||
public UserSessionRule userSessionRule = UserSessionRule.standalone(); | |||
UserSession userSessionMock = mock(UserSession.class); | |||
IssueUpdater issueUpdater = mock(IssueUpdater.class); | |||
SetTypeAction underTest; | |||
@Before | |||
public void before() { | |||
underTest = new SetTypeAction(issueUpdater); | |||
userSessionRule.set(userSessionMock); | |||
} | |||
@Test | |||
public void should_execute() { | |||
String type = "BUG"; | |||
Map<String, Object> properties = newHashMap(); | |||
properties.put("type", "BUG"); | |||
DefaultIssue issue = mock(DefaultIssue.class); | |||
Action.Context context = mock(Action.Context.class); | |||
when(context.issue()).thenReturn(issue); | |||
underTest.execute(properties, context); | |||
verify(issueUpdater).setType(eq(issue), eq(RuleType.BUG), any(IssueChangeContext.class)); | |||
} | |||
@Test | |||
public void should_verify_fail_if_parameter_not_found() { | |||
Map<String, Object> properties = newHashMap(); | |||
try { | |||
underTest.verify(properties, Lists.<Issue>newArrayList(), new AnonymousMockUserSession()); | |||
fail(); | |||
} catch (Exception e) { | |||
assertThat(e).isInstanceOf(IllegalArgumentException.class).hasMessage("Missing parameter: 'type'"); | |||
} | |||
verifyZeroInteractions(issueUpdater); | |||
} | |||
@Test | |||
public void should_support_only_unresolved_issues() { | |||
assertThat(underTest.supports(new DefaultIssue().setResolution(null))).isTrue(); | |||
assertThat(underTest.supports(new DefaultIssue().setResolution(Issue.RESOLUTION_FIXED))).isFalse(); | |||
} | |||
} |
@@ -29,6 +29,6 @@ public class IssueWsModuleTest { | |||
public void verify_count_of_added_components() { | |||
ComponentContainer container = new ComponentContainer(); | |||
new IssueWsModule().configure(container); | |||
assertThat(container.size()).isEqualTo(16); | |||
assertThat(container.size()).isEqualTo(17); | |||
} | |||
} |
@@ -0,0 +1,67 @@ | |||
/* | |||
* SonarQube | |||
* Copyright (C) 2009-2016 SonarSource SA | |||
* mailto:contact AT sonarsource DOT com | |||
* | |||
* This program is free software; you can redistribute it and/or | |||
* modify it under the terms of the GNU Lesser General Public | |||
* License as published by the Free Software Foundation; either | |||
* version 3 of the License, or (at your option) any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |||
* Lesser General Public License for more details. | |||
* | |||
* You should have received a copy of the GNU Lesser General Public License | |||
* along with this program; if not, write to the Free Software Foundation, | |||
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | |||
*/ | |||
package org.sonar.server.issue.ws; | |||
import org.junit.Rule; | |||
import org.junit.Test; | |||
import org.junit.rules.ExpectedException; | |||
import org.sonar.api.rules.RuleType; | |||
import org.sonar.api.server.ws.Request; | |||
import org.sonar.api.server.ws.Response; | |||
import org.sonar.server.issue.IssueService; | |||
import org.sonar.server.ws.WsAction; | |||
import org.sonar.server.ws.WsActionTester; | |||
import static org.mockito.Matchers.any; | |||
import static org.mockito.Matchers.eq; | |||
import static org.mockito.Mockito.mock; | |||
import static org.mockito.Mockito.verify; | |||
public class SetTypeActionTest { | |||
@Rule | |||
public ExpectedException expectedException = ExpectedException.none(); | |||
IssueService issueService = mock(IssueService.class); | |||
OperationResponseWriter responseWriter = mock(OperationResponseWriter.class); | |||
WsAction underTest = new SetTypeAction(issueService, responseWriter); | |||
WsActionTester tester = new WsActionTester(underTest); | |||
@Test | |||
public void set_type() throws Exception { | |||
tester.newRequest() | |||
.setParam("issue", "ABC") | |||
.setParam("type", "BUG") | |||
.execute(); | |||
verify(issueService).setType("ABC", RuleType.BUG); | |||
verify(responseWriter).write(eq("ABC"), any(Request.class), any(Response.class)); | |||
} | |||
@Test | |||
public void fail_if_bad_type_value() { | |||
expectedException.expect(IllegalArgumentException.class); | |||
tester.newRequest() | |||
.setParam("issue", "ABC") | |||
.setParam("severity", "WAT") | |||
.execute(); | |||
} | |||
} |
@@ -6,7 +6,7 @@ | |||
"reporter": "fabrice", | |||
"actionPlan": "AP-ABCD", | |||
"actions": [ | |||
"comment", "assign", "set_tags", "assign_to_me", "plan" | |||
"comment", "assign", "set_tags", "set_type", "assign_to_me", "plan" | |||
], | |||
"transitions": [ | |||
"confirm", "resolve" |
@@ -1,30 +0,0 @@ | |||
{ | |||
"issue": { | |||
"key": "ABCD", | |||
"component": "org.sonar.server.issue.IssueClient", | |||
"componentLongName": "SonarQube :: Issue Client", | |||
"componentQualifier": "FIL", | |||
"componentEnabled": true, | |||
"project": "org.sonar.Sonar", | |||
"projectName": "SonarQube", | |||
"rule": "squid:AvoidCycle", | |||
"ruleName": "Avoid cycle", | |||
"line": 12, | |||
"message": "Fix it", | |||
"resolution": "FIXED", | |||
"status": "CLOSED", | |||
"severity": "MAJOR", | |||
"creationDate": "2014-01-22T19:10:03+0100", | |||
"fCreationDate": "Jan 22, 2014 10:03 AM", | |||
"transitions": [], | |||
"actions": [], | |||
"comments": [], | |||
"changelog": [ | |||
{ | |||
"creationDate": "2014-01-22T19:10:03+0100", | |||
"fCreationDate": "Jan 22, 2014 10:03 AM", | |||
"diffs": ["Created"] | |||
} | |||
] | |||
} | |||
} |
@@ -1,25 +0,0 @@ | |||
{ | |||
"issue": { | |||
"key": "ABCD", | |||
"component": "org.sonar.server.issue.IssueClient", | |||
"componentLongName": "SonarQube :: Issue Client", | |||
"componentQualifier": "FIL", | |||
"componentEnabled": false, | |||
"project": "org.sonar.Sonar", | |||
"projectName": "SonarQube", | |||
"rule": "squid:AvoidCycle", | |||
"ruleName": "Avoid cycle", | |||
"creationDate": "2014-01-22T19:10:03+0100", | |||
"fCreationDate": "Jan 22, 2014 10:03 AM", | |||
"transitions": [], | |||
"actions": [], | |||
"comments": [], | |||
"changelog": [ | |||
{ | |||
"creationDate": "2014-01-22T19:10:03+0100", | |||
"fCreationDate": "Jan 22, 2014 10:03 AM", | |||
"diffs": ["Created"] | |||
} | |||
] | |||
} | |||
} |
@@ -1,27 +0,0 @@ | |||
{ | |||
"issue": { | |||
"key": "ABCD", | |||
"component": "org.sonar.server.issue.IssueClient", | |||
"componentLongName": "SonarQube :: Issue Client", | |||
"componentQualifier": "FIL", | |||
"componentEnabled": true, | |||
"project": "org.sonar.Sonar", | |||
"projectName": "SonarQube", | |||
"rule": "squid:AvoidCycle", | |||
"ruleName": "Avoid cycle", | |||
"actionPlan" : "AP-ABCD", | |||
"actionPlanName" : "Version 4.2", | |||
"creationDate": "2014-01-22T19:10:03+0100", | |||
"fCreationDate": "Jan 22, 2014 10:03 AM", | |||
"transitions": [], | |||
"actions": [], | |||
"comments": [], | |||
"changelog": [ | |||
{ | |||
"creationDate": "2014-01-22T19:10:03+0100", | |||
"fCreationDate": "Jan 22, 2014 10:03 AM", | |||
"diffs": ["Created"] | |||
} | |||
] | |||
} | |||
} |
@@ -1,28 +0,0 @@ | |||
{ | |||
"issue": { | |||
"key": "ABCD", | |||
"component": "org.sonar.server.issue.IssueClient", | |||
"componentLongName": "SonarQube :: Issue Client", | |||
"componentQualifier": "FIL", | |||
"componentEnabled": true, | |||
"project": "org.sonar.Sonar", | |||
"projectName": "SonarQube", | |||
"rule": "squid:AvoidCycle", | |||
"ruleName": "Avoid cycle", | |||
"status": "OPEN", | |||
"creationDate": "2014-01-22T19:10:03+0100", | |||
"fCreationDate": "Jan 22, 2014 10:03 AM", | |||
"transitions": [], | |||
"actions": [ | |||
"comment", "assign", "set_tags", "assign_to_me", "plan" | |||
], | |||
"comments": [], | |||
"changelog": [ | |||
{ | |||
"creationDate": "2014-01-22T19:10:03+0100", | |||
"fCreationDate": "Jan 22, 2014 10:03 AM", | |||
"diffs": ["Created"] | |||
} | |||
] | |||
} | |||
} |
@@ -1,36 +0,0 @@ | |||
{ | |||
"issue": { | |||
"key": "ABCD", | |||
"component": "org.sonar.server.issue.IssueClient", | |||
"componentLongName": "SonarQube :: Issue Client", | |||
"componentQualifier": "FIL", | |||
"componentEnabled": true, | |||
"project": "org.sonar.Sonar", | |||
"projectName": "SonarQube", | |||
"rule": "squid:AvoidCycle", | |||
"ruleName": "Avoid cycle", | |||
"creationDate": "2014-01-22T19:10:03+0100", | |||
"fCreationDate": "Jan 22, 2014 10:03 AM", | |||
"transitions": [], | |||
"actions": [], | |||
"comments": [], | |||
"changelog": [ | |||
{ | |||
"creationDate": "2014-01-22T19:10:03+0100", | |||
"fCreationDate": "Jan 22, 2014 10:03 AM", | |||
"diffs": ["Created"] | |||
}, | |||
{ | |||
"userName": "John", | |||
"creationDate": "2014-02-22T19:10:03+0100", | |||
"fCreationDate": "Fev 22, 2014 10:03 AM", | |||
"diffs": ["Action plan updated to 1.0"] | |||
}, | |||
{ | |||
"creationDate": "2014-02-23T19:10:03+0100", | |||
"fCreationDate": "Fev 23, 2014 10:03 AM", | |||
"diffs": ["Severity updated from Info to Blocker", "Status updated from Reopen to Resolved"] | |||
} | |||
] | |||
} | |||
} |
@@ -1,27 +0,0 @@ | |||
{ | |||
"issue": { | |||
"key": "ABCD", | |||
"component": "org.sonar.server.issue.IssueClient", | |||
"componentLongName": "SonarQube :: Issue Client", | |||
"componentQualifier": "FIL", | |||
"componentEnabled": true, | |||
"project": "org.sonar.Sonar", | |||
"projectName": "SonarQube", | |||
"rule": "squid:AvoidCycle", | |||
"ruleName": "Avoid cycle", | |||
"characteristic": "Maintainability", | |||
"subCharacteristic": "Readability", | |||
"creationDate": "2014-01-22T19:10:03+0100", | |||
"fCreationDate": "Jan 22, 2014 10:03 AM", | |||
"transitions": [], | |||
"actions": [], | |||
"comments": [], | |||
"changelog": [ | |||
{ | |||
"creationDate": "2014-01-22T19:10:03+0100", | |||
"fCreationDate": "Jan 22, 2014 10:03 AM", | |||
"diffs": ["Created"] | |||
} | |||
] | |||
} | |||
} |
@@ -1,43 +0,0 @@ | |||
{ | |||
"issue": { | |||
"key": "ABCD", | |||
"component": "org.sonar.server.issue.IssueClient", | |||
"componentLongName": "SonarQube :: Issue Client", | |||
"componentQualifier": "FIL", | |||
"componentEnabled": true, | |||
"project": "org.sonar.Sonar", | |||
"projectName": "SonarQube", | |||
"rule": "squid:AvoidCycle", | |||
"ruleName": "Avoid cycle", | |||
"creationDate": "2014-01-22T19:10:03+0100", | |||
"fCreationDate": "Jan 22, 2014 10:03 AM", | |||
"transitions": [], | |||
"comments": [ | |||
{ | |||
"key": "COMMENT-ABCD", | |||
"userName": "John", | |||
"raw": "*My comment*", | |||
"html": "<strong>My comment</strong>", | |||
"createdAt": "2014-02-22T19:10:03+0100", | |||
"fCreatedAge": "9 days", | |||
"updatable": false | |||
}, | |||
{ | |||
"key": "COMMENT-ABCE", | |||
"userName": "Arthur", | |||
"raw": "Another comment", | |||
"html": "Another comment", | |||
"createdAt": "2014-02-23T19:10:03+0100", | |||
"fCreatedAge": "10 days", | |||
"updatable": true | |||
} | |||
], | |||
"changelog": [ | |||
{ | |||
"creationDate": "2014-01-22T19:10:03+0100", | |||
"fCreationDate": "Jan 22, 2014 10:03 AM", | |||
"diffs": ["Created"] | |||
} | |||
] | |||
} | |||
} |
@@ -1,30 +0,0 @@ | |||
{ | |||
"issue": { | |||
"key": "ABCD", | |||
"component": "org.sonar.server.issue.IssueClient", | |||
"componentLongName": "SonarQube :: Issue Client", | |||
"componentQualifier": "FIL", | |||
"componentEnabled": true, | |||
"project": "org.sonar.Sonar", | |||
"projectName": "SonarQube", | |||
"rule": "squid:AvoidCycle", | |||
"ruleName": "Avoid cycle", | |||
"creationDate": "2014-01-22T19:10:03+0100", | |||
"fCreationDate": "Jan 22, 2014 10:03 AM", | |||
"updateDate": "2014-01-23T19:10:03+0100", | |||
"fUpdateDate": "Jan 23, 2014 10:03 AM", | |||
"fUpdateAge": "9 days", | |||
"closeDate": "2014-01-24T19:10:03+0100", | |||
"fCloseDate": "Jan 24, 2014 10:03 AM", | |||
"transitions": [], | |||
"actions": [], | |||
"comments": [], | |||
"changelog": [ | |||
{ | |||
"creationDate": "2014-01-22T19:10:03+0100", | |||
"fCreationDate": "Jan 22, 2014 10:03 AM", | |||
"diffs": ["Created"] | |||
} | |||
] | |||
} | |||
} |
@@ -1,32 +0,0 @@ | |||
{ | |||
"issue": { | |||
"key": "ABCD", | |||
"component": "org.sonar.server.issue.IssueClient", | |||
"componentLongName": "SonarQube :: Issue Client", | |||
"componentQualifier": "FIL", | |||
"componentEnabled": true, | |||
"project": "org.sonar.Sonar", | |||
"projectName": "SonarQube", | |||
"subProject": "org.sonar.server.Server", | |||
"subProjectName": "SonarQube :: Server", | |||
"rule": "squid:AvoidCycle", | |||
"ruleName": "Avoid cycle", | |||
"line": 12, | |||
"message": "Fix it", | |||
"resolution": "FIXED", | |||
"status": "CLOSED", | |||
"severity": "MAJOR", | |||
"creationDate": "2014-01-22T19:10:03+0100", | |||
"fCreationDate": "Jan 22, 2014 10:03 AM", | |||
"transitions": [], | |||
"actions": [], | |||
"comments": [], | |||
"changelog": [ | |||
{ | |||
"creationDate": "2014-01-22T19:10:03+0100", | |||
"fCreationDate": "Jan 22, 2014 10:03 AM", | |||
"diffs": ["Created"] | |||
} | |||
] | |||
} | |||
} |
@@ -1,26 +0,0 @@ | |||
{ | |||
"issue": { | |||
"key": "ABCD", | |||
"component": "org.sonar.server.issue.IssueClient", | |||
"componentLongName": "SonarQube :: Issue Client", | |||
"componentQualifier": "FIL", | |||
"componentEnabled": true, | |||
"project": "org.sonar.Sonar", | |||
"projectName": "SonarQube", | |||
"rule": "squid:AvoidCycle", | |||
"ruleName": "Avoid cycle", | |||
"debt": "2h1min", | |||
"creationDate": "2014-01-22T19:10:03+0100", | |||
"fCreationDate": "Jan 22, 2014 10:03 AM", | |||
"transitions": [], | |||
"actions": [], | |||
"comments": [], | |||
"changelog": [ | |||
{ | |||
"creationDate": "2014-01-22T19:10:03+0100", | |||
"fCreationDate": "Jan 22, 2014 10:03 AM", | |||
"diffs": ["Created"] | |||
} | |||
] | |||
} | |||
} |
@@ -1,26 +0,0 @@ | |||
{ | |||
"issue": { | |||
"key": "ABCD", | |||
"component": "org.sonar.server.issue.IssueClient", | |||
"componentLongName": "SonarQube :: Issue Client", | |||
"componentQualifier": "FIL", | |||
"componentEnabled": true, | |||
"project": "org.sonar.Sonar", | |||
"projectName": "SonarQube", | |||
"rule": "squid:AvoidCycle", | |||
"ruleName": "Avoid cycle", | |||
"status": "RESOLVED", | |||
"resolution": "FIXED", | |||
"creationDate": "2014-01-22T19:10:03+0100", | |||
"fCreationDate": "Jan 22, 2014 10:03 AM", | |||
"transitions": ["reopen"], | |||
"comments": [], | |||
"changelog": [ | |||
{ | |||
"creationDate": "2014-01-22T19:10:03+0100", | |||
"fCreationDate": "Jan 22, 2014 10:03 AM", | |||
"diffs": ["Created"] | |||
} | |||
] | |||
} | |||
} |
@@ -1,30 +0,0 @@ | |||
{ | |||
"issue": { | |||
"key": "ABCD", | |||
"component": "org.sonar.server.issue.IssueClient", | |||
"componentLongName": "SonarQube :: Issue Client", | |||
"componentQualifier": "FIL", | |||
"componentEnabled": true, | |||
"project": "org.sonar.Sonar", | |||
"projectName": "SonarQube", | |||
"rule": "squid:AvoidCycle", | |||
"ruleName": "Avoid cycle", | |||
"assignee": "john", | |||
"assigneeName": "John", | |||
"reporter": "steven", | |||
"reporterName": "Steven", | |||
"author": "Henry", | |||
"creationDate": "2014-01-22T19:10:03+0100", | |||
"fCreationDate": "Jan 22, 2014 10:03 AM", | |||
"transitions": [], | |||
"actions": [], | |||
"comments": [], | |||
"changelog": [ | |||
{ | |||
"creationDate": "2014-01-22T19:10:03+0100", | |||
"fCreationDate": "Jan 22, 2014 10:03 AM", | |||
"diffs": ["Created"] | |||
} | |||
] | |||
} | |||
} |
@@ -765,6 +765,7 @@ issue.changelog.field.resolution=Resolution | |||
issue.changelog.field.technicalDebt=Technical Debt | |||
issue.changelog.field.status=Status | |||
issue.changelog.field.tags=Tags | |||
issue.changelog.field.type=Type | |||
#------------------------------------------------------------------------------ |