Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

can't create issue w/ labels via API on some backlogs/boards

Ken Yee
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!
May 10, 2021

I have code that works fine to create an issue on some backlogs but on others, the labels are not set.  There's no error from the JIRA server.

 

The JSON being sent looks like this:
{
"fields": {
"project": {
"key": "APAI"
},
"summary": "H2 PreWork",
"description": "test",
"issuetype": {
"name": "Task"
},
"labels": [
"SFQuality-H2",
"App",
"Testing-Preparation"
],
"priority": {
"name": "Medium"
}
}
}

 

The response that comes back has zero errors:
{"id":"1714366","key":"APAI-432","self":"https://ourjira.internal.com/rest/api/latest/issue/1714366"}

but when you look at the ticket, the labels are missing.

The identical code works fine on a different backlog.

And you can add new labels to this backlog if you edit the ticket/issue...it's not like it's blocking any new labels from being created.

 

 

1 answer

0 votes
Ken Yee
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!
May 11, 2021

Turned out it was because there was an automation rule on this backlog that mucked w/ labels (set them based on content in the ticket).

This caused it to blank out the labels that were sent in via the API :-(

Suggest an answer

Log in or Sign up to answer