So I have a Drupal 7 Workflow rule where an email is sent out when a select field on a comment is set to "Approved'.
This works fine with the exception being if I then add an additional comment to the form, the email is then re-sent. the reason being is that I'm just checking the select field value and triggering the email based on the value.
I just want the email to be sent when the select field is initially set to "Approved".
Here is the export of the rule in question:
{ "rules_notify_status_approved_test" : {
"LABEL" : "Notify - Status Approved TEST",
"PLUGIN" : "reaction rule",
"OWNER" : "rules",
"REQUIRES" : [ "rules" ],
"ON" : { "node_update--request_ad_match" : { "bundle" : "request_ad_match" } },
"IF" : [
{ "node_is_of_type" : {
"node" : [ "node" ],
"type" : { "value" : { "request_ad_match" : "request_ad_match" } }
}
},
{ "user_has_role" : {
"account" : [ "site:current-user" ],
"roles" : { "value" : { "4" : "4" } }
}
},
{ "data_is" : { "data" : [ "node:field-request-status" ], "value" : "74" } },
{ "AND" : [] }
],
"DO" : [
{ "variable_add" : {
"USING" : { "type" : "user", "value" : [ "node:author" ] },
"PROVIDE" : { "variable_added" : { "node_author" : "node author" } }
}
},
{ "mail" : {
"to" : "[email protected]",
"subject" : "request has been approved",
"message" : "request has been approved",
"language" : [ "" ]
}
}
]
}
}
Any direction is appreciated.
Thanks!