Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

CMS Workflow - Email alerts


Go to End


13 Posts   4618 Views

Avatar
Andrew Houle

Community Member, 140 Posts

18 May 2010 at 1:49am

Thanks for the update on the print alert, that was really helpful. I've successfully got the long list of setting alerts to work in my config file. Unfortunately I can't get this simple line to work - WorkflowRequest::set_alert('WorkflowPublicationRequest', 'approve', 'publisher', 'false'); When I do the print alert it seems to have taken correctly here is what it prints...

Array ( [WorkflowPublicationRequest] => Array ( [request] => Array ( [author] => [publisher] => 1 ) [approve] => Array ( [author] => 1 [publisher] => false ) [deny] => Array ( [author] => 1 [publisher] => 1 ) [cancel] => Array ( [author] => 1 [publisher] => 1 ) [comment] => Array ( [author] => [publisher] => ) [requestedit] => Array ( [author] => 1 [publisher] => [approver] => ) ) [WorkflowDeletionRequest] => Array ( [request] => Array ( [author] => [publisher] => 1 ) [approve] => Array ( [author] => 1 [publisher] => 1 ) [deny] => Array ( [author] => 1 [publisher] => 1 ) [cancel] => Array ( [author] => 1 [publisher] => 1 ) [comment] => Array ( [author] => [publisher] => ) ) )

If I'm looking at this right, then this line... [approve] => Array ( [author] => 1 [publisher] => false ) would seem to be correct. However the publishers still get emailed. In the long list, when I change to this...

'approve' => array(
'author' => true,
'publisher' => false
),

It works as expected. I'm happy now that it does what I hoped without hacking the core. However, I thought I should post this info, just in case set_alert has a bug that can be fixed in a future rev.

Thanks again for all the help,
Andrew

Avatar
mark_s

Community Member, 78 Posts

18 May 2010 at 10:11pm

Hi. I'm glad you have a resolution. It sounds there might be a bug though, that behaviour is not what I'd expect, so I'll look into it further.

Thanks
Mark

Avatar
plungerman

Community Member, 2 Posts

28 August 2010 at 8:14am

i think my question is relevant to this thread, but i can create a new one if you think it deviates from the topic at hand. basically, i have the same problem that was discussed at the beginning of the thread. basically, any time someone clicks on "request publication" after making edits, everyone in the system receives an email notification, since everyone seems to be an "approver". at the database level, everyone in the system is in the WorkflowRequest_Approvers table for each workflowrequestid.

as background, we have a master group for "faculty", of which everyone is a member, and under faculty we have a group for each faculty member, where any given faculty member is a member of his or her own group. i bring this up only because i cannot seem to suss out why everyone is established as an "approver". we do not have any roles set up, but when i was playing around with them, that did not have any affect on who was listed as an "approver".

in short, if anyone has a suggestion on how i can establish just the administrators as approvers, that would be ideal.

huge TIA.

Avatar
Corry

Community Member, 17 Posts

13 January 2012 at 3:42pm

Did you ever work this out, plungerman? It sound like you haven't customised the Access (on the Access tab) for the Pages in the site. You need to choose the right groups for the following:
Who can edit this page?
Who can approve requests inside the CMS? (only if 3 step workflow is activated)
Who can publish approved requests inside the CMS?

The default for these is "Inherit from parent page" and at the top level (site configuration) the default is "Anyone who can log-in to the CMS". So if you haven't adjusted the access, everyone will be an approver for every page.

Avatar
Julius0815

Community Member, 3 Posts

10 March 2012 at 2:53am

Try bool
WorkflowRequest::set_alert('WorkflowPublicationRequest', 'approve', 'publisher', false)
instead of string
WorkflowRequest::set_alert('WorkflowPublicationRequest', 'approve', 'publisher', 'false')

Go to Top