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 vote

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.

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
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Julia Dillon
Posted Tuesday in Jira

Tell us how your team runs on Jira!

Hey Atlassian Community! Today we are launching a bunch of customer stories about the amazing work teams, like Dropbox and Twilio, are doing with Jira. You can check out the stories here. The thi...

200 views 1 18
Join discussion

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