Item10008: Implement support for custom email templates on state transition notifications
Current State: Closed
Released In: n/a
Target Release: n/a
The email notification feature of WorkflowPlugin
is currently hard-coded to use a very succinct template, which doesn't communicate much, is universal to all workflows/transitions, and can't be easily modified or overridden.
This feature proposal describes how to extend the Notify
column of workflow transition tables, such that entries in the form of
are loaded and processed as email templates.
Ideally, email templates could:
- be defined as any topic (e.g., TransitionNameTemplate),
- retain the content-sensitivity that the plug-in currently offers, such that both the value in the transition table and the template itself would be expanded within the same content-context as the currently controlled topic.
- operate independently of other entries in the Notify column, i.e., plain email addresses and usernames would still send emails using the default template, allowing workflow developers to mix-and-match email notification types as necessary.
This would elevate the notification feature from a somewhat blunt email "poke" to a powerful pulling mechanism. Custom templates could contain helpful text describing what happened at the state transition, as well as telling the user what they need to do (if action is required), and provide links directly into the wiki so they can contribute to the workflow. Templates could probably also provide an easy way to define CC and BCC fields, which you can't currently do with the single Notify
Allowing multiple templates would also allow you to "fork" notification messages, such that different people can get different content about the same transition event. For example, QA managers might want short blips that say "This thing moved to X", whereas the group now responsible for the document would probably want something indicating that action is required, like "Hey, the ball's in your court now - click here to do stuff."
As an addendum to this feature, a new optional workflow preference called
should be defined, allowing workflow developers an easy way to override the default email template that ships with the plug-in. This could be very useful in situations where you don't need a lot of custom templates, but do want some basic control over what email notifications look like. The documentation should reflect that such templates must use the
macro on their
line if they want to specify email addresses in the Notify
- 12 Nov 2010
As per an IRC conversation with CDot, I've updated the feature proposal to describe the
syntax for specifying email notification templates. I also added the bit about using the
preference to override the default email template.
A bit more documentation cleanup is required, then what I have for this should be ready to commit.
- 18 Nov 2010
What is the status of this effort and of the plug-in? This item says it is being worked on but it doesn't say by whom. WorkflowPlugin:de25f0d6c355
was checked in 3 months or so ago but never released.
- 15 Feb 2011
@BryanThale: Thanks for bumping this issue. Summary of the work that's been done so far:
At this point I think CrawfordCurrie
needs to take a look and see if he can cut a release.
- 22 Feb 2011