Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <customfield id="customfield_10730" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
- <customfieldname>Environnements</customfieldname>
- <customfieldvalues>
- <customfieldvalue key="13044">
- <![CDATA[ DATAOBJECT]]>
- </customfieldvalue>
- </customfieldvalues>
- </customfield>
- JiraRestClientFactory restClientFactory = new AsynchronousJiraRestClientFactory();
- try {
- JiraRestClient restClient = restClientFactory.createWithBasicHttpAuthentication(new URI("http://JIRA_DOMAIN"), "Username", "Passwd");
- IssueRestClient i = restClient.getIssueClient();
- IssueInputBuilder issueBuilder = new IssueInputBuilder("projectKey", issueTypeID));
- issueBuilder.setSummary("description");
- issueBuilder.setFieldValue("customfield_10730", "DATAOBJECT");
- IssueInput issue = issueBuilder.build();
- Promise<BasicIssue> promise = i.createIssue(issue);
- try
- {
- BasicIssue basicIssue = promise.get();
- System.out.println(basicIssue.getId());
- restClient.close();
- }
- catch (Exception e)
- {
- System.out.println(e.getMessage());
- }
- }
- catch (URISyntaxException e)
- {
- System.out.println(e.getMessage());
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement