I have a global transition that fires for every single create and makes the assignee of the task the same as the reporter.
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.
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?
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.
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:
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.
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...
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!
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