Copy value of custom field to another field when updated

Hi.

How can I copy a value of a custom field in JIRA whenever it's updated? I know how to do this in a transition, the field however may be updated outside transitions.

Thanks.

-a-

3 answers

1 accepted

1 votes

Every change to an issue fires an "event" of some sort. You can catch these events in "listeners" and then run much the same code as you have in a transition.

I'd look at Jamie's "Script runner" plugin first - that lets you write code in a listener (or post function etc) without any of the mucking around with the addon framework or coding and compiling outside Jira. It's also free (and frankly, pretty much a standard plugin nowadays)

First question is: why you need it? There's a nice history JIRA manages for the issue, and your field values are in there .... (1)

If you still need to copy the value to another custom-field, you should take a look at plugins like JJUPIN (live fields) [paid] or (maybe) Jamie's Behaviours [free] add-on.

Edit: (1) - You can use for instance Kepler Custom Fields [free] plugin (or any calculated scripted field) and print the value from the history.

Thanks @Nicand @Radu, Jamie's "Script runner" plugin did the trick (and so much more I was unaware of was possible).

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,811 views 11 18
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot