It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

JIRA REST API

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

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you