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: 

JIRA REST API

GI
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!
November 11, 2019

Please paste the full JSON sent to JIRA for request which includes components and labels?

the code below doesnt work. giving {"components":"data was not an array"}}.

String[] components = new String[2];

components[0] = "Chart Review/Assessments";
components[1] = "Risk View Medicaid";

JsonArrayBuilder componentsArray = Json.createArrayBuilder();
for (int i = 0; i < components.length; i++) {
componentsArray.add(components[i]);
}

JsonObject createIssue = Json.createObjectBuilder()
.add("fields", Json.createObjectBuilder()
.add("project", Json.createObjectBuilder().add("key","RAO"))
.add("summary", "Fallon Charts Load October 2019")
.add("description", Jira_desc)
.add("issuetype", Json.createObjectBuilder().add("name", "Task"))
.add("components",Json.createObjectBuilder().add("set",componentsArray))

 

 

0 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

TAGS
AUG Leaders

Atlassian Community Events