Package com.atlassian.jira.rest.client.domain

Examples of com.atlassian.jira.rest.client.domain.BasicResolution


        BasicIssueType issueType = null;
        BasicStatus status = null;

        String description = null;
        BasicPriority priority = null;
        BasicResolution resolution = null;
        Collection<Attachment> attachments = null;
        BasicUser reporter = null;
        BasicUser assignee = null;
        DateTime creationDate = null;
        DateTime updateDate = null;
View Full Code Here


*/
public class ResolutionJsonParser implements JsonObjectParser<Resolution> {
  private final BasicResolutionJsonParser basicResolutionJsonParser = new BasicResolutionJsonParser();
  @Override
  public Resolution parse(JSONObject json) throws JSONException {
    final BasicResolution basicResolution = basicResolutionJsonParser.parse(json);
    final String description = json.getString("description");
        final Long id = JsonParseUtil.getOptionalLong(json, "id");
    return new Resolution(basicResolution.getSelf(), basicResolution.getName(), description, id);
  }
View Full Code Here

  @Override
  public BasicResolution parse(JSONObject json) throws JSONException {
    final String name = json.getString("name");
    final URI selfUri = JsonParseUtil.getSelfUri(json);
        final Long id = JsonParseUtil.getOptionalLong(json, "id");
    return new BasicResolution(selfUri, name, id);
  }
View Full Code Here

    final BasicWatchers watchers = issue.getWatchers();
    assertNotNull(watchers);
    assertEquals(1, watchers.getNumWatchers());

    // resolution
    final BasicResolution resolution = issue.getResolution();
    assertNotNull(resolution);
    assertEquals("Incomplete", resolution.getName());

    if (isJira5xOrNewer()) {
      // changelog
      final Iterable<ChangelogGroup> changelog = issue.getChangelog();
      assertEquals(2, Iterables.size(changelog));
View Full Code Here

    final Transition resolveTransition = TestUtil.getTransitionByName(transitions, "Resolve Issue");

    client.getIssueClient().transition(issue, new TransitionInput(resolveTransition.getId()), pm);

    final Issue resolvedIssue = client.getIssueClient().getIssue("TST-2", pm);
    final BasicResolution basicResolution = resolvedIssue.getResolution();
    assertNotNull(basicResolution);

    final Resolution resolution = client.getMetadataClient().getResolution(basicResolution.getSelf(), pm);
    assertEquals(basicResolution.getName(), resolution.getName());
    assertEquals(basicResolution.getSelf(), resolution.getSelf());
    assertEquals("A fix for this issue is checked into the tree and tested.", resolution.getDescription());
  }
View Full Code Here

    final String dueDateString = getOptionalFieldStringUnisex(shouldUseNestedValueAttribute, s, DUE_DATE_FIELD.id);
    final DateTime dueDate = dueDateString == null ? null : JsonParseUtil.parseDateTimeOrDate(dueDateString);

    final BasicPriority priority = getOptionalField(shouldUseNestedValueAttribute, s, PRIORITY_FIELD.id, priorityJsonParser);
    final BasicResolution resolution = getOptionalField(shouldUseNestedValueAttribute, s, RESOLUTION_FIELD.id, resolutionJsonParser);
    final BasicUser assignee = getOptionalField(shouldUseNestedValueAttribute, s, ASSIGNEE_FIELD.id, userJsonParser);
    final BasicUser reporter = getOptionalField(shouldUseNestedValueAttribute, s, REPORTER_FIELD.id, userJsonParser);

    final BasicProject project = projectJsonParser.parse(getFieldUnisex(s, PROJECT_FIELD.id));
    final Collection<IssueLink> issueLinks;
View Full Code Here

public class BasicResolutionJsonParserTest {
  @Test
  public void testParse() throws Exception {
    final BasicResolutionJsonParser parser = new BasicResolutionJsonParser();
    final BasicResolution basicresolution = parser.parse(ResourceUtil.getJsonObjectFromResource("/json/resolution/valid.json"));
    Assert.assertEquals(new BasicResolution(TestUtil.toUri("http://localhost:8090/jira/rest/api/latest/resolution/4"), "Incomplete", null), basicresolution);
  }
View Full Code Here

    final Transition resolveTransition = TestUtil.getTransitionByName(transitions, "Resolve Issue");

    client.getIssueClient().transition(issue, new TransitionInput(resolveTransition.getId()), pm);

    final Issue resolvedIssue = client.getIssueClient().getIssue("TST-2", pm);
    final BasicResolution basicResolution = resolvedIssue.getResolution();
    assertNotNull(basicResolution);

    final Resolution resolution = client.getMetadataClient().getResolution(basicResolution.getSelf(), pm);
    assertEquals(basicResolution.getName(), resolution.getName());
    assertEquals(basicResolution.getSelf(), resolution.getSelf());
    assertEquals("A fix for this issue is checked into the tree and tested.", resolution.getDescription());
  }
View Full Code Here

*/
public class ResolutionJsonParser implements JsonParser<Resolution> {
  private final BasicResolutionJsonParser basicResolutionJsonParser = new BasicResolutionJsonParser();
  @Override
  public Resolution parse(JSONObject json) throws JSONException {
    final BasicResolution basicResolution = basicResolutionJsonParser.parse(json);
    final String description = json.getString("description");
    return new Resolution(basicResolution.getSelf(), basicResolution.getName(), description);
  }
View Full Code Here

    final Transition resolveTransition = TestUtil.getTransitionByName(transitions, "Resolve Issue");

    client.getIssueClient().transition(issue, new TransitionInput(resolveTransition.getId()), pm);

    final Issue resolvedIssue = client.getIssueClient().getIssue("TST-2", pm);
    final BasicResolution basicResolution = resolvedIssue.getResolution();
    assertNotNull(basicResolution);

    final Resolution resolution = client.getMetadataClient().getResolution(basicResolution.getSelf(), pm);
    assertEquals(basicResolution.getName(), resolution.getName());
    assertEquals(basicResolution.getSelf(), resolution.getSelf());
    assertEquals("A fix for this issue is checked into the tree and tested.", resolution.getDescription());
  }
View Full Code Here

TOP

Related Classes of com.atlassian.jira.rest.client.domain.BasicResolution

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.