Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

How to get scripted field value from linked issue and copy it to issue

Have scripted field in linked issue(suppose issue B) , whose value I need to copy to custom field of issue(suppose issue A).

Can we do this using listener , please provide the sample code.

1 answer

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.
Sep 08, 2022

What is providing the scripted fields?  Scriptrunner or JMWE or something else?

Hi @Nic Brough -Adaptavist- 

We have used Scriptrunner.

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.
Sep 09, 2022

There's a long boring story about how scripted fields work, but it ends in "do not use scripted field results to calculate other stuff on issues - you might not get the right answer".

Imagine you have a scripted field that is "number of days elapsed between the issue got assigned to someone, and the current due date on it".  And imagine that currently says "7".

Next, you have another calculation that simply says "days elapsed * 2".

If someone amends the due date, making it 3 days later, you may find the second field says 18 sometimes and 14 at others.

To fix this, your second calculation needs to repeat what the first one is doing, rather than take the result from the scripted field.

Hi @Nic Brough -Adaptavist- ,

Thanks for your response.

Is it possible to get custom field value of linked issue and copy it to issue using listener?

Rather than copying scripted field value.

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.
Sep 13, 2022

Absolutely, we've even got an example for you to copy, paste, and tweak to suit - https://library.adaptavist.com/entity/copy-field-value-from-linked-issue

Suggest an answer

Log in or Sign up to answer