It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Can a script run from opening a sub-task, update the same script field in an unopened Task or Epic?

I am fairly new to JIRA and have inherited a system with some scripted fields.   The script looks at an Epic , finds the Tasks associated, then the Sub-tasks then sums the effort progress from each Sub-task to come up with the current progress in the Epic.  The same script run from a Task does similar but comes up with the current progress in the Task.   This is all fine.    However, what we would like to do, is have this field in the Epic and the Task, update whenever the Sub-task is updated so that whenever a dashboard summary of Epics is produced the scripted field for the Epic is correct without having to open each Epic.   So the question is, can a script run from opening a sub-task, update the same script field in an unopened Task or Epic?  Any guidance welcome.

1 answer

Hi there,

 

What tool are you using for scripted fields? It may be possible.

 

Sorry for the late response but this is a side task and other stuff had priority!

I am using the embedded script console in JIRA. 

I have since managed to amend the Epic by finding the Task from the sub-task ( using GetParentObject ) and then the Epic using some code I found:

    def customFieldManager = ComponentAccessor.getCustomFieldManager();
    def epicLink = customFieldManager.getCustomFieldObjectByName('Epic Link');

then I run the original Epic code with the found parent and that seems to work.

Ideally I would like to update the Sub-task, Task and Epic fields all at once but that I guess I would need to return 3 values.   Is that allowed? 

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Posted in Confluence

What project did you transition or start on Confluence with the shift to remote work?

It’s been great to hear from fellow users over the last few weeks about the best tips and fun moments you’ve had working on Confluence since the transition to working remote. I’d love to keep the c...

41 views 2 5
Join discussion

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you