Workflow Post Function question

Good morning,

I have already in place a post function from my workflow to create a subtask when a specific transition occurs.

I am wondering if there is a way to add a popup for user to confirm if subtack creation is needed or not.  Obviously treatment would need to match user answer.

Can you help?

Thanks, Sylvain

1 answer

1 accepted

Probably not, post-functions happen after the transition has already completed and no user interaction is possible.

A convoluted way of achieving this would be to have two transitions, one "Do xxx with subtasks" and the other "Do xxx without subtasks". You could even have another field "Create subtasks?" that would control which transition to enable, using workflow/transition Conditions.

Another way might be to have a "Create subtasks?" (NULL/Yes/No) field that is required in a validation. A user can not exit without setting a value. Then use scripting in the post-function to create the subtasks if answer is Yes.

Thanks Sten for the quick answer,

I very much like your suggestion of adding "Create subtasks?" (NULL/Yes/No) field and will test it today for sure!

Thanks again , Sylvain

I'd like to +lots both Sten's suggestion of a transition field to ask the user if they want to create the sub-task, and your response to it.  It works very well. 

Even when the question isn't about the sub-tasks directly - for example, asking the user "does this need to go to the security team?".  They say yes, and a sub-task is created for the security team to deal with.

There is one extra little thing to think about - the "Create subtask" field will stay on the issue.  Consider setting a post-function up to clear it on the same transition, so that the user doesn't create data that might confuse later.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Thursday in Jira

5 ways you can make the most of Jira Software and Bitbucket Cloud

As part of the Bitbucket product team I'm always interested in better understanding what kind of impact the use of our tools have on the way you work. In a recent study we conducted of software devel...

101 views 0 5
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