So I have a FeedMe task that runs and updates a custom field for a select amount of entries.
In my notification email, I have a custom rule like so:
{% if object.customField | length and object.customField == 'hello' %}{{true}} {{else}} {{false}}{% endif %}
When I run the FeedMe task, the email doesn't get sent but I can see the entries get updated. If I go into the entries and save one manually, then the email sends so it seems that the rule works.
I also went in a plugin and set up the following event listener:
Event::on(
Elements::class,
Elements::EVENT_AFTER_SAVE_ELEMENT,
function(ElementEvent $event) {
if ($event->element instanceof Entry) {
$entry = $event->element;
Craft::info('Entry being updated: ' . $entry->title, __METHOD__);
}
}
);
and after I run the FeedMe task again, I check the logs and every entry that was updated by the task is logged as being saved.
In conclusion, I know the entries are being updated and saved by the FeedMe task but the notification email custom rule doesn't trigger unless I manually save the entries.