Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.2] Workflow Notification no recipient #37747

Merged
merged 9 commits into from
Jul 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions administrator/language/en-GB/plg_workflow_notification.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ PLG_WORKFLOW_NOTIFICATION_ADDTEXT_DESC="This text will be sent: Title [title], c
PLG_WORKFLOW_NOTIFICATION_ADDTEXT_LABEL="Additional Message Text"
PLG_WORKFLOW_NOTIFICATION_ON_TRANSITION_MSG="Title: %1$s. Transition \"%2$s\" performed by %3$s. New state: %4$s."
PLG_WORKFLOW_NOTIFICATION_ON_TRANSITION_SUBJECT="The status of \"%s\" has been changed"
PLG_WORKFLOW_NOTIFICATION_NO_RECEIVER="No notifications sent as there are no users to send this message to."
PLG_WORKFLOW_NOTIFICATION_NO_TITLE="Unknown title"
PLG_WORKFLOW_NOTIFICATION_RECEIVERS_LABEL="Users"
PLG_WORKFLOW_NOTIFICATION_SENDMAIL_LABEL="Send Notification"
Expand Down
2 changes: 2 additions & 0 deletions plugins/workflow/notification/notification.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,8 @@ public function onWorkflowAfterTransition(WorkflowTransitionEvent $event)

// If there are no receivers, stop here
if (empty($userIds)) {
$this->app->enqueueMessage(Text::_('PLG_WORKFLOW_NOTIFICATION_NO_RECEIVER'), 'error');

return;
}

Expand Down