Package com.atlassian.jira.rest.client.api.domain.input

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


    // prepare IssueInput
    final List<IssueInput> issuesToCreate = Lists.newArrayList();
    for (final String summary : summaries) {

      final IssueInputBuilder issueInputBuilder =
          new IssueInputBuilder(project, issueType, summary)
              .setDescription(description)
              .setAssignee(assignee)
              .setAffectedVersionsNames(affectedVersionsNames)
              .setFixVersionsNames(fixVersionsNames)
              .setComponents(component)
              .setDueDate(dueDate)
              .setPriority(priority)
              .setFieldValue("parent", ComplexIssueInputFieldValue.with("key", "TST-1"));

      issuesToCreate.add(issueInputBuilder.build());
    }
    assertEquals(summaries.size(), issuesToCreate.size());

    // create
    final BulkOperationResult<BasicIssue> createdIssues = issueClient.createIssues(issuesToCreate).claim();
View Full Code Here


      //last issue to create will have a non existing project - to simulate creation error
      if (summariesWithError.contains(summary)) {
        currentProjectKey = "FAKE_KEY";
      }

      final IssueInputBuilder issueInputBuilder =
          new IssueInputBuilder(currentProjectKey, issueType.getId(), summary)
              .setDescription(description)
              .setAssignee(assignee)
              .setAffectedVersionsNames(affectedVersionsNames)
              .setFixVersionsNames(fixVersionsNames)
              .setComponents(component)
              .setDueDate(dueDate)
              .setPriority(priority)
              .setFieldValue("parent", ComplexIssueInputFieldValue.with("key", "TST-1"));

      issuesToCreate.add(issueInputBuilder.build());
    }
    assertEquals(summaries.size(), issuesToCreate.size());

    // create
    final BulkOperationResult<BasicIssue> createdIssues = issueClient.createIssues(issuesToCreate).claim();
View Full Code Here

      //last issue to create will have a non existing project - to simulate creation error
      if (summariesWithError.contains(summary)) {
        currentProjectKey = "FAKE_KEY";
      }

      final IssueInputBuilder issueInputBuilder =
          new IssueInputBuilder(currentProjectKey, issueType.getId(), summary)
              .setDescription(description)
              .setAssignee(assignee)
              .setAffectedVersionsNames(affectedVersionsNames)
              .setFixVersionsNames(fixVersionsNames)
              .setComponents(component)
              .setDueDate(dueDate)
              .setPriority(priority)
              .setFieldValue("parent", ComplexIssueInputFieldValue.with("key", "TST-1"));

      issuesToCreate.add(issueInputBuilder.build());
    }
    assertEquals(summaries.size(), issuesToCreate.size());

    // create
    try {
View Full Code Here

    // build issue input
    final String summary = "My new issue!";

    // create
    final IssueInput issueInput = new IssueInputBuilder(project, issueType, summary).build();
    final BasicIssue basicCreatedIssue = issueClient.createIssue(issueInput).claim();
    assertNotNull(basicCreatedIssue.getKey());

    // get issue and check if everything was set as we expected
    final Issue createdIssue = issueClient.getIssue(basicCreatedIssue.getKey()).claim();
View Full Code Here

    final IssueRestClient issueClient = client.getIssueClient();

    thrown.expect(RestClientException.class);
    thrown.expectMessage("You must specify a summary of the issue.");

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

    final IssueRestClient issueClient = client.getIssueClient();

    thrown.expect(RestClientException.class);
    thrown.expectMessage("project is required");

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

    final IssueRestClient issueClient = client.getIssueClient();

    thrown.expect(RestClientException.class);
    thrown.expectMessage("valid issue type is required");

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

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

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

    // build issue input
    final String summary = "Some subtask";
    final String description = "Some description for substask";

    // prepare IssueInput
    final IssueInputBuilder issueInputBuilder = new IssueInputBuilder(project, issueType, summary)
        .setDescription(description)
        .setFieldValue("parent", ComplexIssueInputFieldValue.with("key", issue.getKey()));

    // create
    final BasicIssue basicCreatedIssue = issueClient.createIssue(issueInputBuilder.build()).claim();
    assertNotNull(basicCreatedIssue.getKey());

    return basicCreatedIssue;
  }
View Full Code Here

      final IssueRestClient issueClient = restClient.getIssueClient();

      System.out.println("Sending issue creation requests...");
      for (int i = 0; i < 100; i++) {
        final String summary = "NewIssue#" + i;
        final IssueInput newIssue = new IssueInputBuilder("TST", 1L, summary).build();
        System.out.println("\tCreating: " + summary);
        promises.add(issueClient.createIssue(newIssue));
      }

      System.out.println("Collecting responses...");
View Full Code Here

TOP

Related Classes of com.atlassian.jira.rest.client.api.domain.input.IssueInputBuilder

Copyright © 2018 www.massapicom. 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.