Sending email after collaboration approval/denial of content

Author Message

Andy Woods

Tuesday 07 June 2011 11:07:53 am

Hi,

Is it possible to configure ezpublish to send an email to someone once the content they have sent for publishing has been approved or declined by an editor or administrator?

Andy

Brandon Chambers

Tuesday 07 June 2011 2:44:17 pm

Sounds like you might need a custom workflow event.

 

http://share.ez.no/learn/ez-publish/creating-a-simple-custom-workflow-event

Brandon Chambers
brandon@granitehorizon.com
blog: http://blog.divdesigns.com
Granite Horizon / http://granitehorizon.com

Carlos Revillo

Wednesday 08 June 2011 7:40:20 am

By default, eZ Publish doesn't do that kind of stuff. it only e-mails the approvators whenever a new object needs to be approved, but it doesn't send any email when you approve or decline it. 

i'm working in a custom extension trying to add this kind of feature. maybe you can give it at try

https://github.com/crevillo/ezapprovetanta

Andy Woods

Thursday 09 June 2011 8:51:08 am

Hi Carlos,

I've downloaded your ezapprovetanta extension and added it to my web site. I've activated the extension within the ez Setup area.

Do I need to do anything else to get the workflow working?

Thanks,

Andy

Carlos Revillo

Thursday 09 June 2011 9:05:42 am

If all went well, you need to add a "Tanta Approve" event to your workflow instead of the default 'Approve' one. it works just exactly as the default one, adding some things in order to difference the approve collaboration items from the default one.

then, you just need to be sure that the people involved in the collaboration workflow are subscribed to "Tanta Approve Notifications" and not only the default "Approve Notifications" one.

Hope it helps.

Andy Woods

Thursday 09 June 2011 10:44:03 am

Hi Carlos,

Are you saying that I need to edit the 'Before publishing' workflow that is currently using the default 'Event/Approve' and sends emails to the editors to let them know that they have content to approve or decline

or

should I create a new workflow using your 'Tanta Approve' for 'After publishing' to work with the 'after' Connection Type Trigger?

Andy

Carlos Revillo

Thursday 09 June 2011 10:52:08 am

hi again. 

yep, sorry about my english. i know is not very understable :). 

what you need is to edit your before publishing workflow and add a tanta approve event. obviously this will only affect to new items, not the ones you previously have. 

if you add this tanta approve to your before publish workflow, then you can safely remove the default ez publish approve one. what tanta approve does is just create new messages when comment is added to the collaboration item, and also when it's approved or denied. 

in brief, it can replace the default one. 

let me know if you need further help and if you prefer to do it by gtalk or something. 

thanks for trying :). 

Andy Woods

Thursday 09 June 2011 11:20:52 am

Carlos,You're english is absolutely fine :-)The only problem is that no emails are being sent to the editors to let them know that content needs to be approved and no emails are being sent to the user who created the content when the content has been approved.Happy to talk on gtalk tomorrow - which timezone are you in? I'm in England.Andy

Carlos Revillo

Thursday 09 June 2011 11:40:47 am

hi. i'm in madrid. so this is gmt+1

Carlos Revillo

Thursday 09 June 2011 11:53:09 am

btw, i suppose you have setup ez publish runcronjob just like you did with default approve workflow, right?

Andy Woods

Friday 10 June 2011 1:13:12 am

I haven't changed the cronjob since adding your tanta approve event.  It's set to run the 'frequent' cron jobs every 5 minutes.

Do I need to change something to let the cronjob know about the new event?

Andy Woods

Wednesday 15 June 2011 12:26:24 am

Hi Carlos,

Could you answer my previous question please?

Thanks,

Andy

Carlos Revillo

Wednesday 15 June 2011 12:54:25 am

"

Hi Carlos,

Could you answer my previous question please?

Thanks,

Andy

"

Wops. sorry. your cronjob seems to be well configured. notification.php should be the one in charge of sending the emails. if it's not working, it has to be something else.

Andy Woods

Wednesday 15 June 2011 12:29:12 pm

If I remove your event and add the default 'event/approve' back in - then the emails start being sent again.

Has anyone else reported this problem?

I was really hoping that your extension would work as I need to go live with my site in the next few days.

Andy

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 29 2025 23:52:05
Script start
Timing: Jan 29 2025 23:52:05
Module start 'layout'
Timing: Jan 29 2025 23:52:05
Module start 'content'
Timing: Jan 29 2025 23:52:05
Module end 'content'
Timing: Jan 29 2025 23:52:05
Script end

Main resources:

Total runtime0.0153 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0055 588.3906151.2422
Module start 'layout' 0.00550.0024 739.632836.7188
Module start 'content' 0.00790.0060 776.3516102.3438
Module end 'content' 0.01400.0013 878.695345.9766
Script end 0.0152  924.6719 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002616.9672140.0002
Check MTime0.00106.8184140.0001
Mysql Total
Database connection0.00074.276510.0007
Mysqli_queries0.002314.845330.0008
Looping result0.00000.085910.0000
Template Total0.00096.010.0009
Template load0.00074.551310.0007
Template processing0.00021.441110.0002
Override
Cache load0.00053.143010.0005
General
dbfile0.001510.023980.0002
String conversion0.00000.045340.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs