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

Examples of com.atlassian.jira.rest.client.api.domain.Operations


  }

  @Test
  public void testParseIssueWithOperations() throws JSONException {
    final Issue issue = parseIssue("/json/issue/valid-5.0-with-operations.json");
    assertThat(issue.getOperations(), is(new Operations(Collections.singleton(new OperationGroup(
        "opsbar-transitions",
        Collections.singleton(new OperationLink("action_id_4", "issueaction-workflow-transition",
            "Start Progress", "Start work on the issue", "/secure/WorkflowUIDispatcher.jspa?id=93813&action=4&atl_token=",
            10, null)),
        Collections.singleton(new OperationGroup(
View Full Code Here


public class OperationsJsonParserTest {
  @Test
  public void testParse() throws Exception {
    OperationsJsonParser parser = new OperationsJsonParser();
    Operations actual = parser.parse(ResourceUtil.getJsonObjectFromResource("/json/operations/valid.json"));
    assertThat(actual, is(new Operations(Collections.singleton(new OperationGroup(
        "opsbar-transitions",
        Collections.singleton(new OperationLink("action_id_4", "issueaction-workflow-transition",
            "Start Progress", "Start work on the issue", "/secure/WorkflowUIDispatcher.jspa?id=93813&action=4&atl_token=",
            10, null)),
        Collections.singleton(new OperationGroup(
View Full Code Here

          new ChangelogItem(FieldType.CUSTOM, "project3", null, null, "10000", "Test Project"),
          new ChangelogItem(FieldType.CUSTOM, "My Number Field New", null, null, null, "1.45")
      );
      assertEquals(expected, chg2.getItems());
    }
    final Operations operations = issueWithChangelogAndOperations.getOperations();
    if (isJira5xOrNewer()) {
      assertThat(operations, notNullValue());
      assertThat(operations.getOperationById("log-work"), allOf(
              instanceOf(OperationLink.class),
              hasProperty("id", is("log-work"))
          )
      );
    }
View Full Code Here

    final Set<String> labels = Sets
        .newHashSet(parseOptionalArrayNotNullable(issueJson, jsonWeakParserForString, FIELDS, LABELS_FIELD.id));

    final Collection<ChangelogGroup> changelog = parseOptionalArray(
        issueJson, new JsonWeakParserForJsonObject<ChangelogGroup>(changelogJsonParser), "changelog", "histories");
    final Operations operations = parseOptionalJsonObject(issueJson, "operations", operationsJsonParser);

    return new Issue(summary, selfUri, basicIssue.getKey(), basicIssue.getId(), project, issueType, status,
        description, priority, resolution, attachments, reporter, assignee, creationDate, updateDate,
        dueDate, affectedVersions, fixVersions, components, timeTracking, fields, comments,
        transitionsUri, issueLinks,
View Full Code Here

  private final JsonObjectParser<OperationGroup> groupParser = new OperationGroupJsonParser();

  @Override
  public Operations parse(final JSONObject json) throws JSONException {
    final Collection<OperationGroup> linkGroups = JsonParseUtil.parseJsonArray(json.getJSONArray("linkGroups"), groupParser);
    return new Operations(linkGroups);
  }
View Full Code Here

TOP

Related Classes of com.atlassian.jira.rest.client.api.domain.Operations

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.