Summary

Provides a way for administrators to define email transitions and configurable email subject / messages between those transitions. Email transitions can be defined as when content moves from state to state. Based on those email transitions, configurable emails can be created / updated / deleted as the site admin see's fit.

Project URL

https://www.drupal.org/project/workbench_email

Where is the code?

https://www.drupal.org/project/workbench_email/git-instructions
https://github.com/larowlan/workbench_email

Estimated completion date

Unknown

Dependencies

Unknown

Who's doing the port?

Unknown

What help do they need?

Unknown

Comments

Marishka_ created an issue. See original summary.

Marishka_’s picture

Issue summary: View changes
ramarajuk’s picture

porting the module to d8

agentrickard’s picture

With Workbench Moderation stable, here's what developers need to know.

* During EntityPresave, Workbench Moderation calculates the state transition. See \Drupal\workbench_moderation\EntityOperations::entityPresave().

* A new \Drupal\workbench_moderation\Event\WorkbenchModerationTransitionEvent is created and sent to an Event Dispatcher tagged workbench_moderation.state_transition.

* The WorkbenchModerationTransitionEvent object has public methods for getEntity(), getStateBefore(), and getStateAfter().

* Modules may act as desired by declaring an EventSubscriber that responds to WorkbenchModerationEvents::STATE_TRANSITION.

* Cancelling the transition is not allowed.

So for this module, an EventSubscriber that triggers the email service would be ideal.

agentrickard’s picture

If there is sandbox code anywhere, I'd be happy to review.

joebachana’s picture

@ramarajuk please let me know how the port to D8 is going and if you need any help with it (coding, testing)

ramarajuk’s picture

@joebachana got busy with other work and could not make any progress.

plan was to implement as follows

Create a a new service.

services:
workbench_email.config_subscriber:
class: Drupal\workbench_email\EventSubscriber\WorkbenchEventSubscriber
tags:
- { name: event_subscriber }

Create the subscriber classs

use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Drupal\workbench_moderation\Event\WorkbenchModerationEvents;

class WorkbenchEventSubscriber implements EventSubscriberInterface {

static function getSubscribedEvents() {
$events[WorkbenchModerationEvents::STATE_TRANSITION][] = array('handleEmails');
return $events;
}
.......
.......

joebachana’s picture

@ramarajuk sounds good (subject to @agentrickard feedback). When done please lmk and will be happy to help test

agentrickard’s picture

That looks exactly in line with what I was thinking. The real core of the module will be in the management User Interface for subscribing to emails.

larowlan’s picture

Assigned: Unassigned » larowlan

Working on this

larowlan’s picture

Issue summary: View changes

sticking the repo above

larowlan’s picture

Assigned: larowlan » Unassigned

I consider the code in https://github.com/larowlan/workbench_email to be ready now.

See the README for screenshots and configuration instructions.

Happy to be maintainer of D8 branch if that helps.

larowlan’s picture

Status: Needs review » Fixed

We have an alpha

agentrickard’s picture

Status: Fixed » Needs review

As I learned in another issue, Alpha doesn't mean done for the purposes of this tracker.

camoa’s picture

Thanks for the great work.

What are the blockers for an RC for this module?

Thanks

Wim Leers’s picture

apaderno’s picture

Status: Fixed » Closed (fixed)

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