Adding user workflow with email notification
Permalink
Hi,
For a client project, they require us to implement a user workflow system with a user hierarchy such as:
Publisher
Editor
Author
The advanced permissions setting offer the granular permissions level that helps, however what's missing is the ability for say an "author" who makes changes requires the "Editor" to review and approve any changes - be it for a page editor or a file upload.
My developers are aware that there are events in place that can be triggered to send out an email to notify "Editors". We would need a hierarchy of groups of editors and authors so that a select number of editors would receive email notifications as well as be able to view an admin page that lists recent pending changes to be approved/declines (with a text box for a reason).
Some general thoughts:
- With the versioning feature, it would probably be prudent to add the person who approved the change (if applicable) in addition to who made the change.
-
From the above my questions are:
1 - What would be the best way to go about implementing this feature?
2 - If possible, what functions / classes should we be look out for?
3 - Is it possible to attach this workflow to the File Manager? Do you foresee any issues?
4 - As we would like to maintain compatibility with future C5 upgrades, we are inclined to submit this modification to C5 for inclusion into the core code. Would the C5 team be amenable to this provided we adhere to your coding standards and submission policies?
Apologies for the broad question in advance!
Thanks,
Drew
For a client project, they require us to implement a user workflow system with a user hierarchy such as:
Publisher
Editor
Author
The advanced permissions setting offer the granular permissions level that helps, however what's missing is the ability for say an "author" who makes changes requires the "Editor" to review and approve any changes - be it for a page editor or a file upload.
My developers are aware that there are events in place that can be triggered to send out an email to notify "Editors". We would need a hierarchy of groups of editors and authors so that a select number of editors would receive email notifications as well as be able to view an admin page that lists recent pending changes to be approved/declines (with a text box for a reason).
Some general thoughts:
- With the versioning feature, it would probably be prudent to add the person who approved the change (if applicable) in addition to who made the change.
-
From the above my questions are:
1 - What would be the best way to go about implementing this feature?
2 - If possible, what functions / classes should we be look out for?
3 - Is it possible to attach this workflow to the File Manager? Do you foresee any issues?
4 - As we would like to maintain compatibility with future C5 upgrades, we are inclined to submit this modification to C5 for inclusion into the core code. Would the C5 team be amenable to this provided we adhere to your coding standards and submission policies?
Apologies for the broad question in advance!
Thanks,
Drew
1. What's your preferred interface for managing the lists of people who are notified when changes are ready? We've punted on doing complex workflow in the past because, while people have asked for it, we haven't been able to do enough research into the best and most efficient way of managing who gets notified, when.
Certainly, the advanced permissions ALREADY let this kind of thing happen (simply give one group edit access to a page, but not approve access, and give another group access to both.) However you're correct -there's currently no mechanism by which the second group of users could be notified when the first has made their changes.
Would it be as simple as everyone in the group being emailed when a change has happened? Would it be a "subscribe to page" option like in wikipedia or in this forum?
2. I would imagine that most of what you're looking for would be found in concrete/models/collection_version.php and concrete/models/file_version.php. These are the objects that represents versions of pages and files, respectively. They have "approved" booleans in their database tables, as well as records of the users who created and approved each version, and when they were created/approved.
3. I don't really see any issues with approaching both at the same time.
4. Sure - we'd be happy to look at integrating your code. Always happy to take a look at user patches and submissions.