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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.