Jump to:

11003 Posts in 2735 Topics by 1824 members

All other Modules

SilverStripe Forums » All other Modules » CMS Workflow - Email alerts

Discuss all other Modules here.

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

Page: 1 2
Go to End
Author Topic: 2983 Views
  • Andrew Houle
    Community Member
    132 Posts

    Re: CMS Workflow - Email alerts Link to this post

    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,

  • mark_s
    Community Member
    78 Posts

    Re: CMS Workflow - Email alerts Link to this post

    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.


  • plungerman
    Community Member
    2 Posts

    Re: CMS Workflow - Email alerts Link to this post

    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.

  • Corry
    Community Member
    17 Posts

    Re: CMS Workflow - Email alerts Link to this post

    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.

  • Julius0815
    Community Member
    3 Posts

    Re: CMS Workflow - Email alerts Link to this post

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

Page: 1 2
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.