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

Order of nested post-function executions/creations

I have a post-function on issue A that creates issue B and conditionally issue B may or may not create create issue C. All of these issues are on different workflows.(don't)

What is the order in which these post-functions are executed?

My primary point of discovery here is to determine when exactly the first execution stores and re-indexes, as within creation B or C, I would like to come back and potentially clear a field on A or B.

Regards,
Steven

1 answer

1 accepted

1 vote
Answer accepted
Derek_Fields Community Leader Jan 01, 2020

Post-functions fire in the order in which they are called. Issue A creates Issue B. The creation of issue B may create Issue C. It will happen in that order. 

I think your real question is the order of the reindexing? I am not sure, but it may be indeterminate. If the plugin that creates the new issue spawns a new thread to create the new issue and run its Create post-functions, then you may not be able to reliably count on the order in which the threads complete.

If it all occurs in a single thread, then I would expect all of C's Create post-functions to complete before B continues and all of B's post-functions to complete before A continues.

Thank you Derek, I think the reindexing part is what was concerning, I didn't think about each of these processes opening on a different thread, therefore unreliable order, which at times explains some unexpected behavior.

Regards,
Steven

Suggest an answer

Log in or Sign up to answer
TAGS

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