I am trying to use the REST API to create an issue in Jira, which is something that I've had working successfully for ages, but the difference is I'm trying to put in labels as well.
The JSON below (without labels) to create an issue works perfectly :
{{
"fields": {
"project": {
"key": "DS"
},
"summary": "Updating of scripts from Sprint",
"description": "",
"issuetype": {
"name": "Task"
},
"customfield_12702": "3d",
"timetracking": {
"originalEstimate": "3d"
}
}
}}
but the same JSON with a few added lines for labels :
{{
"fields": {
"project": {
"key": "DS"
},
"summary": "Updating of scripts from Sprint",
"description": "",
"issuetype": {
"name": "Task"
},
"customfield_12702": "3d",
"timetracking": {
"originalEstimate": "3d"
},
"labels": [
"Testing",
"Automation"
]
}
}}gives me an error 400 : Bad request.
Has anyone successfully created an issue with labels? What am I doing wrong?