Copy custom field values using Built In Scripts is not working

Pranita Warik September 28, 2020

I created a Filter to list down the issues in which I want to copy the values from a Issue Picker Custom Field Type to Multiple Issue Picker (created via Script Runner).

Built In scripts --> Copy custom field values

On preview, I am able to view this message:

Will operate on 2 issue(s) from the Copy Custom Fields filter....
Copying source field JIRA Project Mapping to target field Jira Project Issue Picker.

But on Run:

0 issue(s) modified.

1 answer

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 30, 2020

The built-in copy script can only handle simple cases where the type of data in the fields is similar enough.  A single issue picker going to a multiple issue picker is not supported.

You will need to write your own bit of code to convert the data you extracted from the single picker field to the multiple-picker type.

Pranita Warik September 30, 2020

@Nic Brough -Adaptavist- 

The Issue Picker Custom Field Type holds multiple values as well. 

Is it conflicting because one is custom field issue picker and the other is scripted field issue picker.

As of now, I have used the import .csv file to upload the values.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 30, 2020

You didn't say which issue picker app you were using, so I took a guess.  Either way, the objects in the two fields are not compatible.

SK March 8, 2023

We are seeing "0 issue(s) modified" even when the data type is identical (number field).
Edit: Nevermind, CF scope issue.

Ty Taylor March 23, 2023

I have the same issue. I have 2 identical Text Field (single line) fields.

Preview Returns:

Will operate on 407 issue(s) from the All MY Issues filter....
Copying source field External issue 1 to target field External issue ID.

Clicking on "Run" returns: 0 issue(s) modified.

The values are never copied over.

Mark Northcott June 10, 2023

I am trying to copy data from one custom field to another and both are Text Field (multi-line). If I do a filter of the issues in the project I see 88 issues with content in the field but only 4 had their data copied using the ScriptRunner. Another had 352 possible but only 55 were copied. 
I've noticed that the ones that were copied were at the top of the list sorted by updated date. Those that were copied had an update date of 10 June 2023 and later.

So it seems that the update date determines when the fields are copied. 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
8.5.1
TAGS
AUG Leaders

Atlassian Community Events