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?
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.
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).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.