Search in sources :

Example 1 with StatusCategory

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))));
}
Also used : Status(com.atlassian.jira.rest.client.api.domain.Status) StatusCategory(com.atlassian.jira.rest.client.api.StatusCategory) Test(org.junit.Test) WithoutJenkins(org.jvnet.hudson.test.WithoutJenkins)

Example 2 with StatusCategory

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);
}
Also used : Status(com.atlassian.jira.rest.client.api.domain.Status) StatusCategory(com.atlassian.jira.rest.client.api.StatusCategory) URI(java.net.URI) Resolution(com.atlassian.jira.rest.client.api.domain.Resolution)

Aggregations

StatusCategory (com.atlassian.jira.rest.client.api.StatusCategory)2 Status (com.atlassian.jira.rest.client.api.domain.Status)2 Resolution (com.atlassian.jira.rest.client.api.domain.Resolution)1 URI (java.net.URI)1 Test (org.junit.Test)1 WithoutJenkins (org.jvnet.hudson.test.WithoutJenkins)1