HI,
I am creating issues using Jira REST API 5.x. Both issue type and components are avaialbe on the same project. The REST API call creates the issue with no component. I tried following syntax, none of them working,
"components": [{"add":{"name":"TestComponent2"}}]
"components": [{"set":{"name":"TestComponent2"}}]
"components": [{"add":[{"name":"TestComponent2"}]}]
"components": [{"set":[{"name":"TestComponent2"}]}]
Please guide me to resolve it.
Community moderators have prevented the ability to post new answers.
It does not need "add" or "set" to include a component in an issue as per documentation,
This syntax works for me,
"components": [{"name":"TestComponent1"}]
I was also having the same problem but it worked for me. Thanks !!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
how can you add multiple components? I tried followings:
"components": [{"id":"XXXX"},{"id":"YYYY}]
"components": [{"id":"XXXX", "id":"YYYY}]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I would guess you need
"components": [{"name":"XXXX"},{"name":"YYYY}]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
how can you add multiple components? I tried followings:
"components": [{"id":"XXXX"},{"id":"YYYY}]
"components": [{"id":"XXXX", "id":"YYYY}]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Jira 7.11 :
{
"update" : {
"components" : [{"set" : [{"name" : "Automation"}]}]
}
}
Yes the json format is hard to follow with so many brackets
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.