Transition not executed due to failed condition with error "Action X is invalid"
When using a "Universal Condition" from JWME such as:
"The Boolean expression {Assignee} = [user] must evaluate to true."
it is fine to change the assignee using the workflow screen form.
On the contrary when using the "Boolean condition with math, date-time or text-string terms" the same type of condition expressed as
%{00003} = %{00020},
i.e. "Only if the following boolean expression is true: %{Assignee} = %{Current user}"
the transition fails with error "Action X is invalid".
It seems like the condition is re-evaluated during the transition being committed? Is there a way to avoid this? Is this by design?
Cheers, Aggelos
Comments (5)
-
repo owner -
reporter Hi Fidel,
well actually our customer's case involves a custom field, so if there is a solution please share.
Cheers, Aggelos
-
repo owner You should add the following term to the boolean expression in your condition:
OR hasChanged(%{aaaaa})
replacing aaaaa with the field code of the custom field that is being edited in workflow screen.
Example: Let's suppose that you want to show a transition only when custom field with field code aaaaa is null, but you want to give it a value in transition's screen.
In this case you should use the following boolean expression in your condition:
%{aaaaa} = null OR hasChanged(%{aaaaa})
-
reporter - edited description
Thank you Fidel, the workaround works just fine.
-
repo owner - changed status to resolved
I close the issue. The only possible solution is the one based on function hasChanged().
- Log in to comment
Hi Aggelos,
Currently there is a solution for the case when the field that is being edited in workflow screen is a custom field, but there isn't for the case when it's a system field like Assignee.
Anyway, I have an idea on how to solve the problem. I expect to have beta version implementing the solution soon.
I will keep you informed at this issue.