Forums / Setup & design / Sending email after collaboration approval/denial of content

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

eZ debug

Timing: Jan 17 2025 22:56:16
Script start
Timing: Jan 17 2025 22:56:16
Module start 'content'
Timing: Jan 17 2025 22:56:17
Module end 'content'
Timing: Jan 17 2025 22:56:17
Script end

Main resources:

Total runtime0.9194 sec
Peak memory usage4,096.0000 KB
Database Queries231

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0051 589.0859180.8047
Module start 'content' 0.00510.7850 769.8906694.9141
Module end 'content' 0.79010.1291 1,464.8047349.2734
Script end 0.9192  1,814.0781 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00380.4169210.0002
Check MTime0.00140.1566210.0001
Mysql Total
Database connection0.00060.060910.0006
Mysqli_queries0.835590.86992310.0036
Looping result0.00220.23922290.0000
Template Total0.897197.620.4485
Template load0.00180.191320.0009
Template processing0.895397.376720.4476
Template load and register function0.00030.030110.0003
states
state_id_array0.00080.091710.0008
state_identifier_array0.00170.182420.0008
Override
Cache load0.00160.1688670.0000
Sytem overhead
Fetch class attribute can translate value0.00120.125640.0003
Fetch class attribute name0.00180.1944150.0001
XML
Image XML parsing0.00320.350540.0008
class_abstraction
Instantiating content class attribute0.00000.0022150.0000
General
dbfile0.00810.8784270.0003
String conversion0.00000.000730.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
14content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
17content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
2content/datatype/view/ezxmltags/link.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/link.tplEdit templateOverride template
1content/datatype/view/ezxmltags/quote.tpldatatype/ezxmltext/quote.tplextension/ezwebin/design/ezwebin/override/templates/datatype/ezxmltext/quote.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 37
 Number of unique templates used: 7

Time used to render debug report: 0.0003 secs