I have 4 Rules based on the same event - "After updating existing content".
Content type has 12 fields, and I want to auto-assign roles to the author based on how many fields he entered.
He will be
Rule 1 : Role1 if he entered SetA of fields,
Rule 2 : Role2 if SetA + SetB,
Rule 3 : Role3 if SetA + SetC,
Rule 4 : Role4 if SetA + SetD

Other than assigning roles, I added another send email action with the appropriate content in it. E.g. if Rule1 is triggered, and executed, the email's contents will be Rule1, so that I know which ones got triggered.

When I entered all fields, I received all 4 emails. Thus, the 4 rules are triggered. But the role of the author ends up as Role4 only.

Does the role assignment action actually appends a new role, or erase the previously, and assign the rule's one exclusively?

Thank you if anyone can point me in the right direction, or explain what might be going on.

Comments

mitchell’s picture

Status: Active » Fixed

It appends.

See "rules_action_user_addrole" in user.rules.inc.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

mitchell’s picture

Component: Miscellaneous » Rules Core

Updated component.