The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

scriptrunner copy custom fields wrong filter result

Retmer van Dongen
Contributor
November 16, 2016

I try to transfer the value of a custom field "Story points_deprecated" to the custom field "Story points". I only want to transfer the value for tickets which not already have a value in the "Story Points" field. I use scriptrunner build in script Copy custom field values. It processes all issues provided by a JQL-filter. I made the filter project = tdh AND "Story points_deprecated" != EMPTY AND "Story Points" = EMPTY and this results in 300 tickets in the issues viewer. However when I use it in scriptrunner the script ends immediately with the message 0 issues modified. The scriptrunner preview stated that 300 issues will be processed. There is nothing in log files.

Anybody a hint to resolve this?

3 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Answer accepted
Thanos Batagiannis _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 Champions.
November 16, 2016

Hi Retmer,

Are you able to update to the latest version ? There was a bug that fixed in the latest version (SRJIRA-2095). 

Alternatively add in your filter a clause that will exclude issues where the source custom field has null / no value. 

0 votes
Retmer van Dongen
Contributor
November 16, 2016

Thanks, With version 4.3.13 it works correctly

Thanos Batagiannis _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 Champions.
November 17, 2016

nice smile

0 votes
Vasiliy Zverev
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.
November 16, 2016

Are you sure that custom field id were specified correctly?