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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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
Published in Opsgenie

Opsgenie and Amazon team up to launch new DevOps Guru integration - now available!

We’re proud to announce that our integration with Amazon DevOps Guru is now live. The Amazon and Opsgenie product teams have worked together to build a deep integration between Opsgenie and the new...

230 views 0 6
Read article

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