Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Hi all,
In 2.x, I cannot find the "workflow transition state change" (or something like it) condition in rules.
I want to test the transition of my nodes, from one state to another (e.g. review -> expired).
My problem is that if I only check the existing workflow state, the rules fire when the transition is done, but also when I edit the node and save it.
From what I've searched, this condition is present in workflow 1.x
Thanks
Comments
Comment #1
johnvIn 2.x, the workflow is a normal field. Althiugh there are some specialties, in this case you use the normal field selectors:
if node:field_myworkflow=3 and node:unchanged=4 then trigger my_rule
.Comment #2
cirrus3d CreditAttribution: cirrus3d commentedThanks for the prompt reply. Would you be kind to elaborate on what the node:unchanged=4 means exactly? Does this refer to the previous workflow state?
Comment #3
johnvYes yku will find that node:__ contains the new value and node:unchanged:__ contains the old value. This way both afe the same when you just save a node without changing workflow. You nay need to enable Token or Entity Tokens. Please confirm if you need to do that.
Comment #4
cirrus3d CreditAttribution: cirrus3d commentedYour recommendation seems to have worked. Thanks!
Comment #5
johnvNice to hear! Good luck!
Comment #6
johnvComment #7
johnv