Copy Epic field named " Cost" to work package associated with this epic

Deleted user June 14, 2017

We are using Jira 7.3, we have a requirement to copy "cost" field of epic, to new or associated work package with this epic, so that the value of the "Cost" field given in epic is copied to its associated work package if that field is empty here

Any help or reference or script

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.
June 14, 2017

What scripting add-on do you have to do this with?

Deleted user June 14, 2017

We have Adaptavist Script runner for Jira if it can be done that would be great for us.

Please suggest other ways too so that i can check other available option too

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.
June 14, 2017

ScriptRunner is probably going to be the best way.  Otherwise you'll need other add-ons to create scripts or provide functions.

Next question though - when do you need to do this update and how?

For example:

If you just want the cost on the Epic to show in the work package at all times, a scripted field is a good option

If you want the cost to copied when creating the issue, then you'll want a post-function on the "create" transition

If you want the cost to be updated when the Epic changes or the issue is edited, you'll need a listener

Deleted user June 14, 2017

Well I need :- When a new work package is created for an Epic or an Epic is selected in a work package the Cost  Field should be copied over if the work package field Cost  is empty.

 

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.
June 14, 2017

>an Epic is selected in a work package

That mandates a listener then.  Start at https://scriptrunner.adaptavist.com/latest/jira/listeners.html - you'll want it to catch issue created and updated events.

Deleted user June 14, 2017

Can you please help me with the code as I am new to this and would be creating the listener for the first time or guide me where i can check for the documentation which i can check and learn

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events