Examples of IssueLink


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

    issueClient.linkIssue(new LinkIssuesInput("TST-7", "TST-6", "Duplicate", commentInput), pm);

    final Issue linkedIssue = issueClient.getIssue("TST-7", pm);
    assertEquals(1, Iterables.size(linkedIssue.getIssueLinks()));
    final IssueLink addedLink = linkedIssue.getIssueLinks().iterator().next();
    assertEquals("Duplicate", addedLink.getIssueLinkType().getName());
    assertEquals("TST-6", addedLink.getTargetIssueKey());
    assertEquals(IssueLinkType.Direction.OUTBOUND, addedLink.getIssueLinkType().getDirection());

    final int expectedNumComments = commentInput != null ? origNumComments + 1 : origNumComments;
    assertEquals(expectedNumComments, Iterables.size(linkedIssue.getComments()));
    if (commentInput != null) {
      final Comment comment = linkedIssue.getComments().iterator().next();
      assertEquals(commentInput.getBody(), comment.getBody());
      assertEquals(USER_ADMIN, comment.getAuthor());
      assertEquals(commentInput.getVisibility(), comment.getVisibility());
    } else {
      assertFalse(linkedIssue.getComments().iterator().hasNext());
    }


    final Issue targetIssue = issueClient.getIssue("TST-6", pm);
    final IssueLink targetLink = targetIssue.getIssueLinks().iterator().next();
    assertEquals(IssueLinkType.Direction.INBOUND, targetLink.getIssueLinkType().getDirection());
    assertEquals("Duplicate", targetLink.getIssueLinkType().getName());
  }
View Full Code Here

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

        final String key = link.getString("key");
        final URI targetIssueUri = JsonParseUtil.parseURI(link.getString("self"));
    final IssueLinkType issueLinkType = new IssueLinkType(issuelinksType.getName(),
        direction.equals(IssueLinkType.Direction.INBOUND) ? issuelinksType.getInward() : issuelinksType.getOutward(), direction);
    return new IssueLink(key, targetIssueUri, issueLinkType);
  }
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.