Transition not executed due to failed condition with error "Action X is invalid"

Issue #363 resolved
Aggelos Paraskevopoulos [Cententia] created an issue

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)

  1. Fidel Castro Armario repo owner

    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.

  2. Aggelos Paraskevopoulos [Cententia] reporter

    Hi Fidel,

    well actually our customer's case involves a custom field, so if there is a solution please share.

    Cheers, Aggelos

  3. Fidel Castro Armario 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})
    
  4. Aggelos Paraskevopoulos [Cententia] reporter
    • edited description

    Thank you Fidel, the workaround works just fine.

  5. Fidel Castro Armario repo owner

    I close the issue. The only possible solution is the one based on function hasChanged().

  6. Log in to comment