cubicweb #1458921 new selector `on_transition` [resolved]

Based upon the is_in_state selector, propose a more robust selector about workflow transition.

Excerpt from the commit message:

  • add new on_transition selector Especially useful to match pending transitions to enable notifications when your workflow allows several transition to the same states. Note that if workflow change_state adapter method is used, this selector will not be triggered.
In debug mode:

These both selectors will check against the entity current workflow if expected values given in selector argument are valid.

ValueError exception will be raised for unmatching state/transition names against the current workflow (generic etype workflow). (check against custom workflow is not implemented)

prioritynormal
typeenhancement
done in3.10.8
load1.000
load left0.000
closed by<not specified>