How do I trigger a post function on null assignee condition

I have a global transition that fires for every single create and makes the assignee of the task the same as the reporter.

post functions.png

 

It works perfectly however when I add the condition Assignee will have to be equal to NULL (empty value in the from) and user number or string or option value as the comparison it never fires.

conditions.png

 

The use case for this is when a task is created but doesn't have an assignee, automatically assign the reporter. This is a really really common use case for developers creating their own issues and the only solutions online seem to revolve around GROOVY script which is not something that we can run in the cloud version of JIRA.

 

Any tips about what's going wrong?

 

2 answers

hi,

it's because your condition and post function are completely independent from each other. you have to create a post function that says "if this then that" but you put "if" in one place, "then" in another.

this is not possible out of the box with JIRA but you can check MISC workflow extensions. I believe you can find a solution wtih this plugin.

https://marketplace.atlassian.com/plugins/com.innovalog.jmwe.jira-misc-workflow-extensions/cloud/overview

In the documentation there's a page on conditions https://confluence.atlassian.com/adminjiraserver070/advanced-workflow-configuration-749383189.html which states 

"

Conditions – check that a transition should be performed by the user.

"

The post function is a post function for this transition which contains the condition (they're all a part of the same transition). How can they be independent? If they are independent then what is conditions designed to actually do? I'm assuming that conditions is designed to decide whether or not the current transition runs or not (and it indeed seems to be preventing this transition from running when I have the condition set which would go against the idea that they are independent).

condition means "if this is true for your issue then you can transition". like for example, with a condition you can check if all the subtasks are complete, then you can make the transition. or if this user has this permission then she/he can transition the issue. or if this user is in this group then she/he can transition the issue. etc.

but post function is what happens after you make the transition. for example after you transition the issue, the assignee is changed. or after you transition the issue a custom field is updated.

yes I can understand how you feel because they are all part of the same transition but they achieve different things. that's why you need to write a post function that says "if this happens then do this".

with your case I don't actually know what's going on so I can't say specifically why it doesnt work. but check out these solutions also:

https://answers.atlassian.com/questions/191975

https://answers.atlassian.com/questions/264544

To put it another way, a Condition and a Post-function are independent because they don't have anything to do with each other.  You can hang them on the same transition, but they don't interact.

A Condition happens before a transition, a post-function happens right at the end of it.

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,139 views 13 19
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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot