Script Post-Function Not Finishing Before Next Post-Function Starts

Cole
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 31, 2017

So I have a jython script post function that will create subtasks if they are needed based on some code logic. After that, I have a fast-track transition script postfunction with a condition to see if there are no subtasks. If there are no subtasks it will move it to a particular transition. This is working, however, it is moving the issue before subtasks are created, so every single issue is being move. It seems like it is following the order, but it only executes the script and immediately moves on, rather than waiting until the script is finished. How can I solve this?

 

Post-Function order:

  1. Set issue status to the linked status of the destination workflow step.
  2. Add a comment to an issue if one is entered during a transition.
  3. Update change history for an issue and store the issue in the database.
  4. Re-index an issue to keep indexes in sync with the database.
  5. Fire a Generic Event event that can be processed by the listeners.
  6. Jython post-function script: file createsubtasks.py is referenced.
  7. The Assignee of the issue will be cleared.
  8. ScriptRunner workflow function - Fast-track transition an issue (condition apply).
    Action: Approved (721) will be applied
    Note that this should go after the Fire Event function.

Instead of 6 completing and then moving on to 7 & 8, it moves on as soon as 6 starts, so subtasks are not created before 8 goes.

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events