This is to be consistent with the Drupal policy of using email instead of mail or e-mail, and to make this class name consistent with the SystemSendEmail action. The patch also changes a few strings and a test case because of this.

The plugin name will remain the same, so the class renaming shouldn't break anything. A cache-clear will be needed however, if you're using this action.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

TR created an issue. See original summary.

  • TR committed 4ef7d36 on 8.x-3.x
    Issue #3159469 by TR: Rename SystemMailToUsersOfRole to...
TR’s picture

Status: Needs review » Fixed

Committed.

jonathan1055’s picture

Two points:

1. If you wanted to rename the plugin, to keep things even more consistent, we'd cope with that, and could alter test cases, etc. But I suppose any existing Reaction Rules would need updating, so maybe that's not worth the trouble.

2.

- *       description = @Translation("The email's message body. This must be plain text, but may contain tokens.")
+ *       description = @Translation("The email's message body. Drupal will by default remove all HTML tags. If you want to use HTML you must override this behavior by installing a contributed module such as Mime Mail.")

Nice explanation regarding html. But the comment about tokens was lost. Was that intentional? I found it useful to see that reminder.

TR’s picture

I thought the mention of tokens could be confusing, because I think most people will read that as core Drupal tokens and that is most definitely NOT what it means.

Instead, it means Rules tokens, and because those can be used in any "direct input" field, I don't think we need to make a special point about that here. We DO however need to document the whole direct input/data selector/token business - I have placeholders in the D8RE documentation for that and I have some stuff I've written but not posted yet, but that's certainly needed. Maybe when we have the documentation we can include a link on every context form to the general information about how to use tokens and what is the difference between direct input and data selector.

maybe that's not worth the trouble

Yes, my thoughts exactly. I would rather have consistency with D7 and previous versions of D8 Rules because having to update plugin machine id's would be a major pain for me and for the users of Rules. I think machine names are generally something we try to hide from the end user, so in a sense they don't matter that much.

jonathan1055’s picture

Yes, totally agree with not renaming the plugin. I realised that when writing, and should have just deleted that point.

Maybe when we have the documentation we can include a link on every context form to the general information about how to use tokens and what is the difference between direct input and data selector.

Great idea.

For the tokens, I was thinking of the twig-style tokens such as {{ node.uid.entity.name.value }} and {{ node_unchanged.title.value }}. Maybe we can make reference to those in your documentation.

Status: Fixed » Closed (fixed)

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