Forums

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

Met issue when trying to update JIRA ticket through REST API

李冲 August 6, 2018

I am trying to update an existing JIRA ticket status from Open to Resolved. When I use below JSON.

{
"transition": {
"id": "5"
},
"fields": {
"resolution": {
"name": "Fixed"
}
},
"update": {
"comment": [
{
"add": {
"body": "Resolve issue"
}
}
]
}
}

 

The API response gives me below:

"error": {
 "errorMessages": [],
  "errors": {
   "customfield_28700": "Reason for the Bug is required for Production Bugs"
  }
}

I don't know what is wrong here, can someone please help me to fix this problem? Thanks a lot!

1 answer

1 accepted

0 votes
Answer accepted
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 6, 2018

The Jira you are trying to update has a validator that requires the entry of a field.  Your code is not filling the field in, so it fails validation.

Either remove the validator, or send data to go in the field

李冲 August 6, 2018

I don't know which field is missing. Earlier it works fine and i am not sure why it suddenly gives me error. 

Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 6, 2018

From the error message, I'd guess you have a field called "Reason for the bug" that has been made mandatory.  Any admin could have added the validator to the workflow.

李冲 August 28, 2018

I found the reason. Thanks a lot for your help. : )

Miki Even-Shani
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!
June 29, 2022

Hi,

I'm facing the same error.

How did you resolve it?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events