cannot update some custom field issue using jira rest api before refreshing manually the issue

Salim
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!
February 6, 2025

 

During a Jira migration to a new Jira Data Center instance where issue keys remain the same as in the previous instance”I am attempting to associate preconditions, test sets, and test plans to a test case using the  JIRA APIs, following the official documentation precisely. However, when I use, for example, PUT server/rest/api/2/issue/testkey to associate customfield_id  preconditions, test set, test plan and sending a correct json  I encounter a null pointer exception stating:  a cannot invoke java.lang.Integer.intValue because parameter 2 is null, and the API call returns a 400 error code along with the corresponding log trace.  java.lang.NullPointerException: Cannot invoke \"java.lang.Integer.intValue()\" because parameters 2 is null"],"errors":{}}

I have verified that all the custom fields are present on the screens, performed both background and full re-indexing, and even implemented retry mechanisms, but nothing has worked. Interestingly, when I manually open the ticket in the Jira browser and then rerun my script without modifying the code, the request succeeds for that ticket (returning a 204 no content status code). 

Since I have approximately 4600 test issues, manually opening each one is not possible

Could you please help identify the cause of this issue and suggest a possible resolution?

jira datacenter version : 09.12.14

Xray:  7.8.2-j9

 

0 answers

Suggest an answer

Log in or Sign up to answer