Examples of ChangelogGroup


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

    final Issue issueWithChangelogAndOperations = client.getIssueClient().getIssue("TST-2", EnumSet.of(CHANGELOG, OPERATIONS))
        .claim();
    final Iterable<ChangelogGroup> changelog = issueWithChangelogAndOperations.getChangelog();
    if (isJira5xOrNewer()) {
      assertNotNull(changelog);
      final ChangelogGroup chg1 = Iterables.get(changelog, 18);
      assertEquals("admin", chg1.getAuthor().getName());
      assertEquals("Administrator", chg1.getAuthor().getDisplayName());
      assertEquals(new DateTime(2010, 8, 17, 16, 40, 34, 924).toInstant(), chg1.getCreated().toInstant());

      assertEquals(Collections
          .singletonList(new ChangelogItem(FieldType.JIRA, "status", "1", "Open", "3", "In Progress")), chg1
          .getItems());

      final ChangelogGroup chg2 = Iterables.get(changelog, 20);
      assertEquals("admin", chg2.getAuthor().getName());
      assertEquals("Administrator", chg2.getAuthor().getDisplayName());
      assertEquals(new DateTime(2010, 8, 24, 16, 10, 23, 468).toInstant(), chg2.getCreated().toInstant());

      final List<ChangelogItem> expected = ImmutableList.of(
          new ChangelogItem(FieldType.JIRA, "timeoriginalestimate", null, null, "0", "0"),
          new ChangelogItem(FieldType.CUSTOM, "My Radio buttons", null, null, null, "Another"),
          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(
View Full Code Here

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

  @Override
  public ChangelogGroup parse(JSONObject json) throws JSONException {
    final DateTime created = JsonParseUtil.parseDateTime(json, "created");
    final BasicUser author = json.has("author") ? JsonParseUtil.parseBasicUser(json.getJSONObject("author")) : null;
    final Collection<ChangelogItem> items = JsonParseUtil.parseJsonArray(json.getJSONArray("items"), changelogItemJsonParser);
    return new ChangelogGroup(author, created, items);
  }
View Full Code Here

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

  @Override
  public ChangelogGroup parse(JSONObject json) throws JSONException {
    final DateTime created = JsonParseUtil.parseDateTime(json, "created");
    final BasicUser author = json.has("author") ? JsonParseUtil.parseBasicUser(json.getJSONObject("author")) : null;
    final Collection<ChangelogItem> items = JsonParseUtil.parseJsonArray(json.getJSONArray("items"), changelogItemJsonParser);
    return new ChangelogGroup(author, created, items);
  }
View Full Code Here

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

    final Issue issueWithChangelog = client.getIssueClient().getIssue("TST-2", EnumSet.of(IssueRestClient.Expandos.CHANGELOG), pm);
    final Iterable<ChangelogGroup> changelog = issueWithChangelog.getChangelog();
    if (isJira5xOrNewer()) {
      assertNotNull(changelog);
      final ChangelogGroup chg1 = Iterables.get(changelog, 18);
      assertEquals("admin", chg1.getAuthor().getName());
      assertEquals("Administrator", chg1.getAuthor().getDisplayName());
      assertEquals(new DateTime(2010, 8, 17, 16, 40, 34, 924).toInstant(), chg1.getCreated().toInstant());

      assertEquals(Collections
          .singletonList(new ChangelogItem(ChangelogItem.FieldType.JIRA, "status", "1", "Open", "3", "In Progress")), chg1
          .getItems());

      final ChangelogGroup chg2 = Iterables.get(changelog, 20);
      assertEquals("admin", chg2.getAuthor().getName());
      assertEquals("Administrator", chg2.getAuthor().getDisplayName());
      assertEquals(new DateTime(2010, 8, 24, 16, 10, 23, 468).toInstant(), chg2.getCreated().toInstant());

      final List<ChangelogItem> expected = ImmutableList.of(
          new ChangelogItem(ChangelogItem.FieldType.JIRA, "timeoriginalestimate", null, null, "0", "0"),
          new ChangelogItem(ChangelogItem.FieldType.CUSTOM, "My Radio buttons", null, null, null, "Another"),
          new ChangelogItem(ChangelogItem.FieldType.CUSTOM, "project3", null, null, "10000", "Test Project"),
          new ChangelogItem(ChangelogItem.FieldType.CUSTOM, "My Number Field New", null, null, null, "1.45")
      );
      assertEquals(expected, chg2.getItems());
    }
  }
View Full Code Here

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

  @Override
  public ChangelogGroup parse(JSONObject json) throws JSONException {
    final DateTime created = JsonParseUtil.parseDateTime(json, "created");
    final BasicUser author = json.has("author") ? JsonParseUtil.parseBasicUser(json.getJSONObject("author")) : null;
    final Collection<ChangelogItem> items = JsonParseUtil.parseJsonArray(json.getJSONArray("items"), changelogItemJsonParser);
    return new ChangelogGroup(author, created, items);
  }
View Full Code Here

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

    final Issue issueWithChangelog = client.getIssueClient().getIssue("TST-2", EnumSet.of(IssueRestClient.Expandos.CHANGELOG), pm);
    final Iterable<ChangelogGroup> changelog = issueWithChangelog.getChangelog();
    if (isJira5xOrNewer()) {
      assertNotNull(changelog);
      final ChangelogGroup chg1 = Iterables.get(changelog, 18);
      assertEquals("admin", chg1.getAuthor().getName());
      assertEquals("Administrator", chg1.getAuthor().getDisplayName());
      assertEquals(new DateTime(2010, 8, 17, 16, 40, 34, 924).toInstant(), chg1.getCreated().toInstant());

      assertEquals(Collections
          .singletonList(new ChangelogItem(ChangelogItem.FieldType.JIRA, "status", "1", "Open", "3", "In Progress")), chg1
          .getItems());

      final ChangelogGroup chg2 = Iterables.get(changelog, 20);
      assertEquals("admin", chg2.getAuthor().getName());
      assertEquals("Administrator", chg2.getAuthor().getDisplayName());
      assertEquals(new DateTime(2010, 8, 24, 16, 10, 23, 468).toInstant(), chg2.getCreated().toInstant());

      final List<ChangelogItem> expected = ImmutableList.of(
          new ChangelogItem(ChangelogItem.FieldType.JIRA, "timeoriginalestimate", null, null, "0", "0"),
          new ChangelogItem(ChangelogItem.FieldType.CUSTOM, "My Radio buttons", null, null, null, "Another"),
          new ChangelogItem(ChangelogItem.FieldType.CUSTOM, "project3", null, null, "10000", "Test Project"),
          new ChangelogItem(ChangelogItem.FieldType.CUSTOM, "My Number Field New", null, null, null, "1.45")
      );
      assertEquals(expected, chg2.getItems());
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.