scriptrunner copy custom fields wrong filter result

Retmer van Dongen 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

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 Leaders.
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 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 Leaders.
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 Leaders.
November 16, 2016

Are you sure that custom field id were specified correctly?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events