Scriptrunner post function: Update a custom text field with values from other custom fields

Aaron Andrade November 9, 2017

We have a custom single text field XYZ.  In the workflow there is a transition with a post function "Create subtask".  In this post function we 'copy parent issue custom fields' which includes the field XYZ.   Whenever the value in field XYZ includes a url (i.e. https://here.we.are.com) it won't copy.  However, when the https:// is removed (i.e. here.we.are.com) it copies.

We are on JIRA 7.2.6.

Any advise?

1 answer

0 votes
Anton Chemlev - Toolstrek -
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 13, 2017

What type of field do you use for XYZ field? And to what type of field do you copy XYZ value?

Aaron Andrade November 13, 2017

It is a "Single Text Field"   I am copying it to the exact same custom field in a sub-task ticket.

Anton Chemlev - Toolstrek -
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 13, 2017

What plugin do you use to get this function? I'll try to reproduce.

It seems to me that you should try to use URL custom field type. It looks like a security feature to prevent embedding malicious urls. Maybe I'm wrong.

Aaron Andrade November 15, 2017

In the workflow transition I am using the post function "Create subtask" and in the field "Copy parent issue custom fields" I list the field XYZ (I don't specify the id, just the name).   This "Create subtask is from the plugin "Bob Swift Atlassian Add-ons - Create on Transition" of which I am using version 5.7.0.

Note I did have it as a URL but the value for that field can be a non-url value which is why we changed it to a text field.  It stores both url and non-url values.  The copying isn't allowing it though.

Aaron Andrade July 24, 2018

Update.

We have upgraded JIRA in our test environment to 7.10.2 and Bob Swift Altassian Add-ons - Create on Transition to 6.1.0 and it appears to be copying it correctly.

Suggest an answer

Log in or Sign up to answer