Examples of IssueInputBuilder


Examples of com.atlassian.jira.rest.client.api.domain.input.IssueInputBuilder

    thrown.expect(RestClientException.class);
    thrown.expectMessage(String
        .format("Invalid value '%s' passed for customfield 'My Radio buttons'. Allowed values are: 10000[abc], 10001[Another], 10002[The last option], -1", invalidPriority
            .getId()));

    final IssueInput issueInput = new IssueInputBuilder("TST", 1L, "Should fail")
        .setFieldValue("customfield_10001", invalidPriority)
        .build();
    issueClient.createIssue(issueInput).claim();
  }
View Full Code Here

Examples of com.atlassian.jira.rest.client.api.domain.input.IssueInputBuilder

  public void testCreateIssueAsAnonymous() {
    setAnonymousMode();

    final IssueRestClient issueClient = client.getIssueClient();

    final IssueInput issueInput = new IssueInputBuilder("ANONEDIT", 1L, "Anonymously created issue").build();
    final BasicIssue createdIssue = issueClient.createIssue(issueInput).claim();

    assertNotNull(createdIssue);
    assertNotNull(createdIssue.getKey());
  }
View Full Code Here

Examples of com.atlassian.jira.rest.client.api.domain.input.IssueInputBuilder

    thrown.expect(RestClientException.class);
    thrown.expectMessage("Anonymous users do not have permission to create issues in this project. Please try logging in first.");

    // TODO: add summary when JIRA bug is fixed (JRADEV-13412)
    final IssueInput issueInput = new IssueInputBuilder("TST", 1L/*, "Issue created by testCreateIssueAsAnonymousWhenNotAllowed"*/)
        .build();
    issueClient.createIssue(issueInput).claim();
  }
 
View Full Code Here

Examples of com.atlassian.jira.rest.client.api.domain.input.IssueInputBuilder

    final IssueRestClient issueClient = client.getIssueClient();

    thrown.expect(RestClientException.class);
    thrown.expectMessage("Field 'summary' cannot be set. It is not on the appropriate screen, or unknown.");

    final IssueInput issueInput = new IssueInputBuilder("TST", 1L, "Sample summary").build();
    issueClient.createIssue(issueInput).claim();
  }
View Full Code Here

Examples of com.atlassian.jira.rest.client.api.domain.input.IssueInputBuilder

    final IssueRestClient issueClient = client.getIssueClient();

    thrown.expect(RestClientException.class);
    thrown.expectMessage("Field 'assignee' cannot be set. It is not on the appropriate screen, or unknown.");

    final IssueInput issueInput = new IssueInputBuilder("TST", 1L, "Issue created by testCreateIssueWithAssigneeWhenNotAllowedToAssignIssue")
        .setAssignee(IntegrationTestUtil.USER_ADMIN)
        .build();
    issueClient.createIssue(issueInput).claim();
  }
View Full Code Here

Examples of com.atlassian.jira.rest.client.api.domain.input.IssueInputBuilder

    thrown.expect(RestClientException.class);
    thrown.expectMessage("You do not have permission to create issues in this project.");

    // TODO: add summary when JIRA bug is fixed (JRADEV-13412)
    final IssueInput issueInput = new IssueInputBuilder("NCIFU", 1L/*, "Issue created by testCreateIssueWithoutCreateIssuePermission"*/)
        .build();
    issueClient.createIssue(issueInput).claim();
  }
 
View Full Code Here

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

    @Override
    public void process(Exchange exchange) throws Exception {
        String projectKey = exchange.getIn().getHeader("ProjectKey", String.class);
        Long issueTypeId = exchange.getIn().getHeader("IssueTypeId", Long.class);
        String issueSummary = exchange.getIn().getHeader("IssueSummary", String.class);
        IssueInputBuilder issueBuilder = new IssueInputBuilder(projectKey, issueTypeId);
        issueBuilder.setDescription(exchange.getIn().getBody(String.class));
        issueBuilder.setSummary(issueSummary);
        BasicIssue issue = client().getIssueClient().createIssue(issueBuilder.build(), null);
       
        // support InOut
        if (exchange.getPattern().isOutCapable()) {
            // copy the header of in message to the out message
            exchange.getOut().copyFrom(exchange.getIn());
View Full Code Here

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

    thrown.expect(RestClientException.class);
    thrown.expectMessage(String
        .format("Invalid value '%s' passed for customfield 'My Radio buttons'. Allowed values are: 10000[abc], 10001[Another], 10002[The last option], -1", invalidPriority
            .getId()));

    final IssueInput issueInput = new IssueInputBuilder("TST", 1L, "Should fail")
        .setFieldValue("customfield_10001", invalidPriority)
        .build();
    issueClient.createIssue(issueInput, pm);
  }
View Full Code Here

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

  public void testCreateIssueAsAnonymous() {
    setAnonymousMode();

    final IssueRestClient issueClient = client.getIssueClient();

    final IssueInput issueInput = new IssueInputBuilder("ANONEDIT", 1L, "Anonymously created issue").build();
    final BasicIssue createdIssue = issueClient.createIssue(issueInput, pm);

    assertNotNull(createdIssue);
    assertNotNull(createdIssue.getKey());
  }
View Full Code Here

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

    thrown.expect(RestClientException.class);
    thrown.expectMessage("Anonymous users do not have permission to create issues in this project. Please try logging in first.");

    // TODO: add summary when JIRA bug is fixed (JRADEV-13412)
    final IssueInput issueInput = new IssueInputBuilder("TST", 1L/*, "Issue created by testCreateIssueAsAnonymousWhenNotAllowed"*/)
        .build();
    issueClient.createIssue(issueInput, pm);
  }
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.