Forums

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

Copy scripted field value to another custom field

Edimara Souza
Contributor
March 17, 2022

Hi

I have a scripted field thar shows a percentual evolution of an epic according his child issues is done.

I need to copy the value of this field to another text custom field .

I try to use the script runner function "copy field values" but I can't find the custon scripted field to put on "source field" selection


Is there any way to make this run?

 

 

I saw this article https://community.atlassian.com/t5/Jira-Core-Server-questions/Copy-Custom-field-value-from-one-field-to-another/qaq-p/73207

 

 

but apparently there is an error at line 32

CR.JPG

1 answer

1 accepted

0 votes
Answer accepted
Nic Brough -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.
March 17, 2022

There is a problem with Scripted fields in that you can't rely on their calculated content being available or correct in other scripts and automations.  That's why it won't let you select the scripted field as a source.

You'll need to replicate the work the scripted field is doing in your "copy from" process, not just copy it.

Edimara Souza
Contributor
March 17, 2022

How I do this?

 

I am a little bit layman in this subject

Nic Brough -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.
March 17, 2022

You will need to write a script to do this.

You can copy the script that provides your scripted field though, replacing the "return <result>" line with code that puts the result in the target field for your "copy"

caseybaloney10
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 31, 2022

i'm still a bit newbie in this. Your explanation make sense but how you you put result into the target field ?

Nic Brough -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.
March 31, 2022

Suggest an answer

Log in or Sign up to answer