JSU: Copy Value From Other Field (JSU)

KRC May 9, 2018

Hi

We have a need to copy a linked issue key to a custom field. So from a JSD project, we are creating a linked JIRA issue in Jira project(ABC).  When the user hits "Create Ticket" status in JSD workflow, a Jira ticket gets created in project ABC with an issue like as the child of JSD. Now once ABC-1 is created we want that key ABC-1 to be copied into a custom field in JSD project. 

We have JSU add-on and we tried all options in post function-Copy Value From Other Field (JSU) but no luck. Any thoughts?

2 answers

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.
May 9, 2018

The key is not the same type of field as whatever you are trying to copy it to, so the field copy function fails.

JSU can't convert between the types, you are going to need something a bit more clever.

KRC May 10, 2018

Good to know this piece of information.

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.
May 10, 2018

The Key for an issue is a key object, and a text field will take objects that are derived from strings.

You should be able to do something like

issueToChange.setCustomFieldValue(customfield, issueToGetKeyFrom.getKey() )

Vineela Durbha March 10, 2019

I am using Copy Value from Custom field (JSU) within the same issue on one of the tranistion. But I see the value is not being copied.

I tried to place this post function before Update change history but still I dont see any change.

 

Can anyone help on this

0 votes
David Friedrich
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.
May 9, 2018

Are you using Scriptrunner by any chance?

KRC May 10, 2018

Yes, and we landed near script runner and scripted fields.

Suggest an answer

Log in or Sign up to answer