Scriptrunner copy custom field values produces error

Jeremy Coukoulis August 5, 2016

Attempting to use Scriptrunners built-in script "copy custom field values"

When I run the preview I get 700 issues will be affected, which is correct. However, upon executing, it always comes back with the same error:

Error

undefined

java.lang.NullPointerException at com.atlassian.jira.issue.customfields.impl.MultiSelectCFType.getChangelogString(MultiSelectCFType.java:313) at com.atlassian.jira.issue.customfields.impl.MultiSelectCFType.getChangelogString(MultiSelectCFType.java:83) at com.atlassian.jira.issue.fields.CustomFieldImpl.getChangelogString(CustomFieldImpl.java:481) at com.atlassian.jira.issue.fields.CustomFieldImpl.updateValue(CustomFieldImpl.java:509) at com.atlassian.jira.issue.fields.CustomFieldImpl.updateValue(CustomFieldImpl.java:487) at com.atlassian.jira.issue.fields.OrderableField$updateValue.call(Unknown Source) at com.onresolve.scriptrunner.canned.jira.admin.CopyCustomField.doScript(CopyCustomField.groovy:203)
Both the source and target fields are the same Field Type (multiselect) and have the the same search template (multiselectsearcher) so I'm not sure what the hang up is.
On my target field there are two different multi select configuration schemes (different lists based on project) do I need to define which configuration to copy to somewhere in the script?

2 answers

0 votes
JamieA
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 7, 2016

Thanks for letting us know, this is https://productsupport.adaptavist.com/browse/SRJIRA-1995.

0 votes
Mark McCormack _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 5, 2016

Hi Jeremy,

Could you please let us answer a few questions so that we can try to help you further - like:

  • What version of JIRA are you using?
  • What version of ScriptRunner are you using?

I can reproduce this on my own machine against the latest version (4.3.5) so you have likely found a bug. Perhaps you could raise this with us on our Support Portal: https://productsupport.adaptavist.com/servicedesk/customer/portal/2 so we can track it through to a fix?

Thanks in advance, Mark.

 

 

Jeremy Coukoulis August 5, 2016

 JIRA version - 6.3.4

Scriptrunner version 4.1.3.14

Following your suggestion, I entered this issue on the support portal as well.

Suggest an answer

Log in or Sign up to answer