Examples of IssueType


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

    assertNull(issue.getResolution());
    assertEquals(toDateTime("2010-07-26T13:29:18.262+0200"), issue.getCreationDate());
    assertEquals(toDateTime("2012-12-07T14:52:52.570+01:00"), issue.getUpdateDate());
    assertEquals(null, issue.getDueDate());

    final IssueType expectedIssueType = new IssueType(toUri("http://localhost:8090/jira/rest/api/2/issuetype/1"), 1L,
        "Bug", false, "A problem which impairs or prevents the functions of the product.",
        toUri("http://localhost:8090/jira/images/icons/bug.gif"));
    assertEquals(expectedIssueType, issue.getIssueType());

    assertEquals(TestConstants.USER_ADMIN, issue.getReporter());
View Full Code Here

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

    assertEquals(expectedVotes, issue.getVotes());

    final BasicWatchers expectedWatchers = new BasicWatchers(toUri("http://localhost:8090/jira/rest/api/2/issue/TST-7/watchers"), false, 0);
    assertEquals(expectedWatchers, issue.getWatchers());

    final IssueType expectedIssueType = new IssueType(toUri("http://localhost:8090/jira/rest/api/2/issuetype/3"), 3L, "Task", false, "A task that needs to be done.", toUri("http://localhost:8090/jira/images/icons/task.gif"));
    assertEquals(expectedIssueType, issue.getIssueType());
  }
View Full Code Here

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

    final OptionalIterable<IssueType> issueTypes = project.getIssueTypes();
    if (isJira4x4OrNewer()) {
      assertTrue(issueTypes.isSupported());
      final Iterator<IssueType> issueTypesIterator = issueTypes.iterator();
      assertTrue(issueTypesIterator.hasNext());
      final IssueType it = issueTypesIterator.next();
      if (isJira5xOrNewer()) {
        assertEquals(Long.valueOf(1), it.getId());
      } else {
        assertNull(it.getId());
      }
      assertEquals(it.getName(), "Bug");
    } else {
      assertFalse(issueTypes.isSupported());
    }
  }
View Full Code Here

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

  @JiraBuildNumberDependent(BN_JIRA_5)
  public void testGetIssueTypes() {
    final Iterable<IssueType> issueTypes = client.getMetadataClient().getIssueTypes().claim();
    assertEquals(5, Iterables.size(issueTypes));

    final IssueType issueType = findEntityBySelfAddressSuffix(issueTypes, "/5");
    assertEquals("Sub-task", issueType.getName());
    assertEquals("The sub-task of the issue", issueType.getDescription());
    assertEquals(Long.valueOf(5), issueType.getId());
    assertTrue(issueType.isSubtask());
    assertNotNull(issueType.getSelf());
  }
View Full Code Here

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

          "We expected exactly one allowed value - the issue type %s (%s) for project  %s (%s)",
          testProject.getName(), testProject.getKey(), cimIssueType.getName(), cimIssueType.getId());
      assertEquals(assertMessageAllowedValuesSizeNotMatch, 1, Iterables.size(allowedValues));

      //noinspection unchecked
      final IssueType firstAllowedValue = (IssueType) Iterables.getOnlyElement(allowedValues);
      assertEquals(firstAllowedValue.getId(), cimIssueType.getId());
    }
  }
View Full Code Here

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

    final String description = getOptionalFieldStringUnisex(issueJson, DESCRIPTION_FIELD.id);

    final Collection<Attachment> attachments = parseOptionalArray(issueJson, new JsonWeakParserForJsonObject<Attachment>(attachmentJsonParser), FIELDS, ATTACHMENT_FIELD.id);
    final Collection<IssueField> fields = parseFields(issueJson);

    final IssueType issueType = issueTypeJsonParser.parse(getFieldUnisex(issueJson, ISSUE_TYPE_FIELD.id));
    final DateTime creationDate = JsonParseUtil.parseDateTime(getFieldStringUnisex(issueJson, CREATED_FIELD.id));
    final DateTime updateDate = JsonParseUtil.parseDateTime(getFieldStringUnisex(issueJson, UPDATED_FIELD.id));

    final String dueDateString = getOptionalFieldStringUnisex(issueJson, DUE_DATE_FIELD.id);
    final DateTime dueDate = dueDateString == null ? null : JsonParseUtil.parseDateTimeOrDate(dueDateString);
View Full Code Here

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

        .toInstant());
    Assert.assertEquals("Test Project", project.getName());
    final OptionalIterable<IssueType> issueTypes = project.getIssueTypes();
    Assert.assertTrue(issueTypes.isSupported());
    Assert.assertThat(issueTypes, IsIterableContainingInAnyOrder.containsInAnyOrder(
        new IssueType(TestUtil
            .toUri("http://localhost:2990/jira/rest/api/latest/issuetype/1"), 1L, "Bug", false, "A problem which impairs or prevents the functions of the product.", TestUtil
            .toUri("http://localhost:2990/jira/images/icons/bug.gif")),
        new IssueType(TestUtil
            .toUri("http://localhost:2990/jira/rest/api/latest/issuetype/2"), 2L, "New Feature", false, "A new feature of the product, which has yet to be developed.", TestUtil
            .toUri("http://localhost:2990/jira/images/icons/newfeature.gif")),
        new IssueType(TestUtil
            .toUri("http://localhost:2990/jira/rest/api/latest/issuetype/3"), 3L, "Task", false, "A task that needs to be done.", TestUtil
            .toUri("http://localhost:2990/jira/images/icons/task.gif")),
        new IssueType(TestUtil
            .toUri("http://localhost:2990/jira/rest/api/latest/issuetype/4"), 4L, "Improvement", false, "An improvement or enhancement to an existing feature or task.", TestUtil
            .toUri("http://localhost:2990/jira/images/icons/improvement.gif")),
        new IssueType(TestUtil
            .toUri("http://localhost:2990/jira/rest/api/latest/issuetype/5"), 5L, "Sub-task", true, "The sub-task of the issue", TestUtil
            .toUri("http://localhost:2990/jira/images/icons/issue_subtask.gif"))
    ));
  }
View Full Code Here

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

    final String name = json.getString("name");
    final boolean isSubtask = json.getBoolean("subtask");
    final String iconUrl = JsonParseUtil.getOptionalString(json, "iconUrl");
    final URI iconUri = iconUrl == null ? null : JsonParseUtil.parseURI(iconUrl);
    final String description = JsonParseUtil.getOptionalString(json, "description");
    return new IssueType(selfUri, id, name, isSubtask, description, iconUri);
  }
View Full Code Here

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

    final OptionalIterable<IssueType> issueTypes = project.getIssueTypes();
    if (isJira4x4OrNewer()) {
      assertTrue(issueTypes.isSupported());
      final Iterator<IssueType> issueTypesIterator = issueTypes.iterator();
      assertTrue(issueTypesIterator.hasNext());
      final IssueType it = issueTypesIterator.next();
      if (isJira5xOrNewer()) {
        assertEquals(Long.valueOf(1), it.getId());
      } else {
        assertNull(it.getId());
      }
      assertEquals(it.getName(), "Bug");
    } else {
      assertFalse(issueTypes.isSupported());
    }
  }
View Full Code Here

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

  @JiraBuildNumberDependent(BN_JIRA_5)
  public void testGetIssueTypes() {
    final Iterable<IssueType> issueTypes = client.getMetadataClient().getIssueTypes().claim();
    assertEquals(5, Iterables.size(issueTypes));

    final IssueType issueType = findEntityBySelfAddressSuffix(issueTypes, "/5");
    assertEquals("Sub-task", issueType.getName());
    assertEquals("The sub-task of the issue", issueType.getDescription());
    assertEquals(Long.valueOf(5), issueType.getId());
    assertTrue(issueType.isSubtask());
    assertNotNull(issueType.getSelf());
  }
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.