Examples of LinkIssuesInput


Examples of com.atlassian.jira.rest.client.domain.input.LinkIssuesInput

    }
    assertErrorCode(Response.Status.NOT_FOUND,
        IntegrationTestUtil.TESTING_JIRA_5_OR_NEWER ? "Issue Does Not Exist" : "The issue no longer exists.", new Runnable() {
      @Override
      public void run() {
        client.getIssueClient().linkIssue(new LinkIssuesInput("TST-7", "FAKEKEY-1", "Duplicate", null), pm);
      }
    });

    assertErrorCode(Response.Status.NOT_FOUND, "No issue link type with name 'NonExistingLinkType' found.", new Runnable() {
      @Override
      public void run() {
        client.getIssueClient().linkIssue(new LinkIssuesInput("TST-7", "TST-6", "NonExistingLinkType", null), pm);
      }
    });

    setUser1();
    final String optionalDot = isJira5xOrNewer() ? "." : "";
    assertErrorCode(Response.Status.NOT_FOUND, "You do not have the permission to see the specified issue" + optionalDot, new Runnable() {
      @Override
      public void run() {
        client.getIssueClient().linkIssue(new LinkIssuesInput("TST-7", "RST-1", "Duplicate", null), pm);
      }
    });
    assertErrorCode(Response.Status.BAD_REQUEST, "Failed to create comment for issue 'TST-6'\nYou are currently not a member of the project role: Administrators.", new Runnable() {
      @Override
      public void run() {
        client.getIssueClient().linkIssue(new LinkIssuesInput("TST-7", "TST-6", "Duplicate",
            Comment.createWithRoleLevel("my body", "Administrators")), pm);
      }
    });
    assertErrorCode(Response.Status.BAD_REQUEST, "You are currently not a member of the group: jira-administrators.", new Runnable() {
      @Override
      public void run() {
        client.getIssueClient().linkIssue(new LinkIssuesInput("TST-7", "TST-6", "Duplicate",
            Comment.createWithGroupLevel("my body", "jira-administrators")), pm);
      }
    });
    assertErrorCode(Response.Status.BAD_REQUEST, "Group: somefakegroup does not exist.", new Runnable() {
      @Override
      public void run() {
        client.getIssueClient().linkIssue(new LinkIssuesInput("TST-7", "TST-6", "Duplicate",
            Comment.createWithGroupLevel("my body", "somefakegroup")), pm);
      }
    });


    setUser2();
    assertErrorCode(Response.Status.UNAUTHORIZED, "No Link Issue Permission for issue 'TST-7'", new Runnable() {
      @Override
      public void run() {
        client.getIssueClient().linkIssue(new LinkIssuesInput("TST-7", "TST-6", "Duplicate", null), pm);
      }
    });

  }
View Full Code Here

Examples of com.atlassian.jira.rest.client.domain.input.LinkIssuesInput

    final IssueRestClient issueClient = client.getIssueClient();
    final Issue originalIssue = issueClient.getIssue("TST-7", pm);
    int origNumComments = Iterables.size(originalIssue.getComments());
    assertFalse(originalIssue.getIssueLinks().iterator().hasNext());

    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());
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.