Drupal 7工作流程规则-在选择字段更改时触发

时间:2018-07-12 17:51:24

标签: drupal workflow

所以我有一个Drupal 7工作流程规则,当评论的选择字段设置为“已批准”时,将发送一封电子邮件。

这很好用,但是如果我随后向表单添加其他注释,则重新发送电子邮件。原因是我只是检查选择字段值并根据该值触发电子邮件。

我只希望在选择字段最初设置为“已批准”时发送电子邮件。

这是相关规则的导出:

{ "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@email.com",
      "subject" : "request has been approved",
      "message" : "request has been approved",
      "language" : [ "" ]
    }
  }
]
}
}

任何方向都值得赞赏。

谢谢!

0 个答案:

没有答案