Workflow conditional post funtion

We have recently been asked to report on when an issue enters the status in progress.  My initial thought is to have a post function set the start date based on the start progress transition.  However, if you stop progress and start progress again, this would reset the date.  Is there a way to conditionally populate this field only if it is empty?  Or is there a better way to do this?

2 answers

0 votes

Yes, but no.

Post functions always run when the transition is executed, so "no"

But if you need to do this, you write the post function with it in mind - put something like "if date not empty, exit" at the top of the code for it.

0 votes
Peter Bengov Community Champion Nov 16, 2014

It might be useful to do the following - using Conditions together with Post Functions:

  • Duplicate the specific transition you wanted to add a Post Function to.
  • Set a condition for that copied transition based on JQL. Something like "start date" is not EMPTY. Making this transition show only when a ticket already started progress before. This transition won't have a post function to populate start date field. 
  • The original transition will have the opposite transition, like "start date" is EMPTY. And will have a Post Function to populate start date field.

Hope it helps

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,711 views 17 21
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