I want to access the list of possible states in a project or crosscheck also if current state is equal to a specific state.
I seems that if i uses
issue.becomes('State','next state name')
I can get true or false but i want to do it using an enumerated way.
I see that i can check with:
and example is
issue.fields.State.name == ctx.State.Open.name
In this i get error that Open does is not defined.
Based on your workflow examples on the dependency example you have inside the guard.
return ctx.issue.fields.becomes(ctx.State, ctx.State.Fixed) && ctx.issue.links['depends on'].isNotEmpty();
In my case even ctx.State is undefined when you place it in workflow.message(ctx.State)
In your documentation
you have example: