We are migrating bugs from Bugzilla to Jira,for that
We are trying to set Component while creatinng a bug in Jira through REST API
Below is my Json request in groovy(Plugins is the component name i want to set which already exist i tried to give its id also by getting meta data):
json.fields() {
project {
key issueAttr.projectKey
}
summary issueAttr.summary
description issueAttr.description
issuetype {
name issueAttr.issueType
}
customfield_10102 issueAttr.bugzillaUrl
assignee {
name issueAttr.assignee
}
priority {
name issueAttr.priority
}
components: [{
name "Plugins"
}]
}
when i print json object it did not contain component field
{
"fields": {
"project": {
"key": "WAT"
},
"summary": "Bug 18728: Identify new API calls (XML-RPC) in Nessus v5.0",
"description": "Identify new API calls (XML-RPC) in Nessus v5.0",
"issuetype": {
"name": "Bug"
},
"customfield_10102": "http://bugs.redseal.net/show_bug.cgi?id=18728",
"assignee": {
"name": "shreyaskn"
},
"priority": {
"name": "Trivial"
}
}
}
Plz help me
Community moderators have prevented the ability to post new answers.
This syntax works for me,
"components": [{"name":"Component1"}]
I wish they would have included this in the API documentation!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
try with the following code
"components": [{ "id": "10000" }]
check here lot of example are here
https://answers.atlassian.com/questions/34115/set-issue-priority-and-component-with-rest-api
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.