use of com.atlassian.jira.rest.client.api.StatusCategory in project jira-plugin by jenkinsci.
the class JiraCreateIssueNotifierTest method isDone.
@Test
@WithoutJenkins
public void isDone() {
assertTrue(JiraCreateIssueNotifier.isDone(new Status(null, null, "Closed", null, null, null)));
assertTrue(JiraCreateIssueNotifier.isDone(new Status(null, null, "Done", null, null, null)));
assertTrue(JiraCreateIssueNotifier.isDone(new Status(null, null, "Resolved", null, null, null)));
assertTrue(JiraCreateIssueNotifier.isDone(new Status(null, null, "Abandoned", null, null, new StatusCategory(null, "Done", null, "done", null))));
assertFalse(JiraCreateIssueNotifier.isDone(new Status(null, null, "Abandoned", null, null, new StatusCategory(null, "ToDo", null, "todo", null))));
}
use of com.atlassian.jira.rest.client.api.StatusCategory in project camel-spring-boot by apache.
the class Utils method transitionIssueDone.
public static Issue transitionIssueDone(Issue issue) {
URI doneStatusUri = URI.create(TEST_JIRA_URL + "/rest/api/2/status/1");
URI doneResolutionUri = URI.create(TEST_JIRA_URL + "/rest/api/2/resolution/1");
StatusCategory sc = new StatusCategory(doneResolutionUri, "statusCategory", 1L, "SC-1", "GREEN");
Status status = new Status(doneStatusUri, 1L, "Done", "Done", null, sc);
Resolution resolution = new Resolution(doneResolutionUri, 5L, "Resolution", "Resolution");
return transitionIssueDone(issue, status, resolution);
}
Aggregations