Examples of IssueType


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

    final Project project = parser.parse(ResourceUtil.getJsonObjectFromResource("/json/project/project-jira-5-0.json"));
    assertEquals("TST", project.getKey());
    assertEquals(new DateMidnight(2010, 8, 25).toInstant(), Iterables.getLast(project.getVersions()).getReleaseDate().toInstant());
    assertEquals("Test Project", project.getName());
    assertThat(project.getIssueTypes(), containsInAnyOrder(
        new IssueType(new URI("http://localhost:2990/jira/rest/api/latest/issuetype/1"), 1L, "Bug", false, "A problem which impairs or prevents the functions of the product.", new URI("http://localhost:2990/jira/images/icons/bug.gif")),
        new IssueType(new URI("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.", new URI("http://localhost:2990/jira/images/icons/newfeature.gif")),
        new IssueType(new URI("http://localhost:2990/jira/rest/api/latest/issuetype/3"), 3L, "Task", false, "A task that needs to be done.", new URI("http://localhost:2990/jira/images/icons/task.gif")),
        new IssueType(new URI("http://localhost:2990/jira/rest/api/latest/issuetype/4"), 4L, "Improvement", false, "An improvement or enhancement to an existing feature or task.", new URI("http://localhost:2990/jira/images/icons/improvement.gif")),
        new IssueType(new URI("http://localhost:2990/jira/rest/api/latest/issuetype/5"), 5L, "Sub-task", true, "The sub-task of the issue", new URI("http://localhost:2990/jira/images/icons/issue_subtask.gif"))
    ));
  }
View Full Code Here

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

  }

  @Test
  public void testGetIssueType() {
    final BasicIssueType basicIssueType = client.getIssueClient().getIssue("TST-1", pm).getIssueType();
    final IssueType issueType = client.getMetadataClient().getIssueType(basicIssueType.getSelf(), pm);
    assertEquals("Bug", issueType.getName());
    assertEquals("A problem which impairs or prevents the functions of the product.", issueType.getDescription());
    Long expectedId = isJira5xOrNewer() ? 1L : null;
    assertEquals(expectedId, issueType.getId());
    assertTrue(issueType.getIconUri().toString().endsWith("bug.gif"));
  }
View Full Code Here

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

  final IssueTypeJsonParser issueTypeJsonParser = new IssueTypeJsonParser();
  final CimFieldsInfoMapJsonParser fieldsParser = new CimFieldsInfoMapJsonParser();

  @Override
  public CimIssueType parse(final JSONObject json) throws JSONException {
    final IssueType issueType = issueTypeJsonParser.parse(json);
    final JSONObject jsonFieldsMap = json.optJSONObject("fields");
   
    final Map<String, CimFieldInfo> fields = (jsonFieldsMap == null) ?
        Collections.<String, CimFieldInfo>emptyMap() : fieldsParser.parse(jsonFieldsMap);

    return new CimIssueType(issueType.getSelf(), issueType.getId(), issueType.getName(),
        issueType.isSubtask(), issueType.getDescription(), issueType.getIconUri(), fields);
  }
View Full Code Here

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

  public IssueType parse(JSONObject json) throws JSONException {
    final BasicIssueType basicIssueType = basicIssueTypeJsonParser.parse(json);
    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(basicIssueType.getSelf(), basicIssueType.getId(), basicIssueType.getName(), basicIssueType.isSubtask(), description, iconUri);
  }
View Full Code Here

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

    assertEquals(2, Iterables.size(project.getVersions()));
    assertEquals(2, Iterables.size(project.getComponents()));
    final Iterator<IssueType> issueTypesIterator = project.getIssueTypes().iterator();
    if (isJira4x4OrNewer()) {
      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(issueTypesIterator.hasNext());
    }
  }
View Full Code Here

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

  @JiraBuildNumberDependent(BN_JIRA_5)
  public void testGetIssueTypes() {
    final Iterable<IssueType> issueTypes = client.getMetadataClient().getIssueTypes(pm);
    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.domain.IssueType

    final URI issueUri = JsonParseUtil.parseURI(json.getString("self"));
    final String issueKey = json.getString("key");
    final JSONObject fields = json.getJSONObject("fields");
    final String summary = fields.getString("summary");
    final Status status = statusJsonParser.parse(fields.getJSONObject("status"));
    final IssueType issueType = issueTypeJsonParser.parse(fields.getJSONObject("issuetype"));
    return new Subtask(issueKey, issueUri, summary, issueType, status);
  }
View Full Code Here

Examples of com.google.test.metric.report.issues.IssueType

          Map<String, Object> attributes = new HashMap<String, Object>();
          attributes.put(IMarker.SEVERITY, IMarker.SEVERITY_ERROR);
          attributes.put(IMarker.LINE_NUMBER, issue.getLocation().getLineNumber());
          attributes.put(IMarker.MESSAGE,
              retriever.getSuggestion(issue.getType(), issue.getSubType()));
          IssueType issueType = issue.getType();
          attributes.put(TestabilityConstants.ISSUE_TYPE, issue.getType().toString());
          String markerType = null;
          if (IssueType.COLLABORATOR.equals(issueType)) {
            markerType = TestabilityConstants.TESTABILITY_COLLABORATOR_MARKER_TYPE;
          } else if (IssueType.CONSTRUCTION.equals(issueType)) {
View Full Code Here

Examples of org.apache.maven.plugin.changes.IssueType

    public void applyConfiguration( Map<String, String> issueTypes )
        throws MojoExecutionException
    {
        for ( Map.Entry<String, String> me : issueTypes.entrySet() )
        {
            IssueType type = IssueType.lookupByKey( me.getValue() );
            if ( type == null )
            {
                throw new MojoExecutionException( "Invalid issue action " + me.getValue() );
            }
            String imsTypes = me.getKey();
View Full Code Here

Examples of org.apache.maven.plugin.changes.IssueType

    public void applyConfiguration( Map<String, String> issueTypes )
        throws MojoExecutionException
    {
        for ( Map.Entry<String, String> me : issueTypes.entrySet() )
        {
            IssueType type = IssueType.lookupByKey( me.getKey() );
            if ( type == null )
            {
                throw new MojoExecutionException( "Invalid issue action " + me.getKey() );
            }
            String imsTypes = me.getValue();
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.