Forums

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

How to resolve the 500 error when importing bulk custom fields?

Saarvaani Vadlamani
Contributor
March 1, 2016

I am trying to run the curl command to import bulk custom fields from my command line.

The command looks like below:

curl -u <username>:<password> "https://<JIRA url>/rest/scriptrunner/latest/canned/com.onresolve.scriptrunner.canned.jira.admin.BulkImportCustomFieldValues" -H "X-Atlassian-token: no-check" -H "Content-Type: application/x-www-form-urlencoded; charset=UTF-8" -H "Accept: application/json" --data "@add-opt.json"

contents of add-opt.json:

scriptParams={
"FIELD_FCS":"Default Configuration Scheme for samplelist2",
"FIELD_IMPORT_VALUES":"option1",
"canned-script":"com.onresolve.scriptrunner.canned.jira.admin.BulkImportCustomFieldValues"
}

I am getting the following error:

{"message":"For input string: \"Default Configuration Scheme for samplelist2\"",
"status-code":500,"stack-trace":"java.lang.NumberFormatException: For input stri
ng: \"Default Configuration Scheme for samplelist2\"\r\n\tat com.onresolve.scrip
trunner.canned.jira.admin.BulkImportCustomFieldValues.getSchemeFromParams(BulkIm
portCustomFieldValues.groovy:83)\r\n\tat com.onresolve.scriptrunner.canned.jira.
admin.BulkImportCustomFieldValues.doValidate(BulkImportCustomFieldValues.groovy:
68)\r\n"}

Please help in figuring out where I am going wrong.

Thank you

2 answers

1 accepted

Suggest an answer

Log in or Sign up to answer
0 votes
Answer accepted
Mirek
Community Champion
December 17, 2013

The problem was related to duplicated fields. New fields was created on every upgrade. Very complex but on the other hand a good workaround fixed the problem:

https://confluence.atlassian.com/display/GHKB/How+to+Fix+the+Duplicate+GreenHopper+Custom+Fields+After+Upgrading

I hope that this aricle will help someone that is having a similar problem.

Best Regards,

Mirek

ViswanathanR
March 3, 2015

No permissions to view the article

0 votes
C_ Faysal
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 Champions.
June 20, 2013

hi mirek.

i did so..

removed Global Rank and Rank (Obsolete)

we had no data loss

to be on the save side i suggest cloning your instance and test it in the non-productive environment

Mirek
Community Champion
June 23, 2013

Thank you! We are not doing any thing without using TEST instance, so in this case for sure it will be tested in that way..

BTW.

How did you check that everything is ok and nothing is lost?

TAGS
AUG Leaders

Atlassian Community Events