Advertisement
Guest User

Untitled

a guest
Feb 27th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.23 KB | None | 0 0
  1. <customfield id="customfield_10730" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
  2. <customfieldname>Environnements</customfieldname>
  3. <customfieldvalues>
  4. <customfieldvalue key="13044">
  5. <![CDATA[ DATAOBJECT]]>
  6. </customfieldvalue>
  7. </customfieldvalues>
  8. </customfield>
  9.  
  10. JiraRestClientFactory restClientFactory = new AsynchronousJiraRestClientFactory();
  11. try {
  12.  
  13. JiraRestClient restClient = restClientFactory.createWithBasicHttpAuthentication(new URI("http://JIRA_DOMAIN"), "Username", "Passwd");
  14. IssueRestClient i = restClient.getIssueClient();
  15. IssueInputBuilder issueBuilder = new IssueInputBuilder("projectKey", issueTypeID));
  16. issueBuilder.setSummary("description");
  17. issueBuilder.setFieldValue("customfield_10730", "DATAOBJECT");
  18. IssueInput issue = issueBuilder.build();
  19.  
  20. Promise<BasicIssue> promise = i.createIssue(issue);
  21. try
  22. {
  23. BasicIssue basicIssue = promise.get();
  24. System.out.println(basicIssue.getId());
  25. restClient.close();
  26. }
  27. catch (Exception e)
  28. {
  29. System.out.println(e.getMessage());
  30. }
  31.  
  32. }
  33. catch (URISyntaxException e)
  34. {
  35. System.out.println(e.getMessage());
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement