The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to set the "Target Release" field in Java

Charles Moulliard
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 6, 2020

Hi,

 

How can I set the "Target Release" field using the Atlassian Java API - jira-rest-java-client-core (v: 5.2.1) ?

This field within the UI to create an issue appears as a custom field

<div class="field-group" >
<label for="customfield_12311240">Target Release</label>
<select class=" select" id="customfield_12311240" name="customfield_12311240" data-remove-null-options="true">
<option value="-1" selected="selected">Unknown</option>
<optgroup label="Unreleased Versions">
<option value="12345960">2.3.0.GA</option>
<option value="12346085">2.2.8.GA</option>
<option value="12346388">2.1.15.GA</option>
</optgroup>
...
</select>
<div class="description">Target release this issue is proposed/approved to be solved in.</div>
</div>

 

We can create an IssueInputBuilder using the following code 

IssueRestClient cl = restClient.getIssueClient();

IssueInputBuilder iib = new IssueInputBuilder();
iib.setProjectKey("ENTSBT");
iib.setSummary(release.getTitle());

But now, How can we set the field "Target Release" ? Using "setFieldInput(new FieldInput(" ?

 

Regards

 

Charles

 

0 comments

Comments for this post are closed

Community moderators have prevented the ability to post new comments.

TAGS
AUG Leaders

Atlassian Community Events