Is there a way to change the order in which post functions and conditions are carried out?

I have a post function to fire subtasks upon a transition and a condition to check whether the subtasks are in a certain status before allowing a transition. I want to know if there is a way to delay the status change.  For example, When I click on the "submitted" transition from Status A to Status B I want the following to occur:

  1. Transition is clicked
  2. Subtasks are fired via post function
  3. Condition is met (all subtasks are in "Approved" status")
  4. Name of the status is changed to the next status (Status A is then changed to Status B) via post function  

Our workflow is that we are sending the subtasks to gain approvals for a document. I don't want the status to change to the next status until all of the approvals are gained, because the issue shouldn't be assigned to the next person until the document is approved. If there is a better solution than what I have outlined above please let me know. Thanks!

2 answers

There is no way to do that - you're trying to wedge a two-step process into a single step, and that won't work.

There's nothing wrong with your process, you just need to translate it into a better shape in Jira.  You actually have three logical steps in your process, not two - what you've described is almost "issue is in limbo between submitted and approved".  So:

  • Something needs doing, and we need approvals for it
  • The task is not approved
  • The task is approved

In Jira, that pans out (in the most simple case) as two three steps:

  • Not submitted
  • Submitted
  • Approved

With two transitions:

  • Not submitted -> Submitted: Submit - creates all the subtasks
  • Submitted -> Approved: Approve - closes off the task as approved, and has the condition for "all subtasks must be closed"

I think you can see where the conditions and post-functions fall in that structure.


Part of my problem-and I should have mentioned this-is that there are five subtasks that are fired upon the parent transition. All of the subtasks need to be in Approved status before it is actually moved to the next status. I think I will just have to make a Pending Approval status in the parent workflow because I don't want the ticket to be assigned to the next person until all of the approvals are gained and I'm not sure how to do this without an additional status.

I think that's pretty much what my cousin said - your process has three steps, but you're trying to wedge two of them into a single step.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 27, 2018 in Portfolio for Jira

Introducing a new planning experience in Portfolio for Jira (Server/DC)

In the past, Portfolio for Jira required a high degree of detail–foresight that was unrealistic for many businesses to   have–in   order to produce a reliable long-term roadmap. We're tur...

2,894 views 19 22
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you