notification on state change

Author Message

Marko Žmak

Tuesday 09 August 2011 5:53:38 pm

When using subtree notifications...

It seems like there's no posibility to receive email notification when a state of an object is changed.

So imagine this scenario:

  • we have an editorial workflow with an approve mechanism that is using object states
  • when a new object is published it gets the status "draft" which is not visible by regular users
  • editor approves the object by setting it's state to "approved and published" - then it's visible to regular users

So in this scenarion the regular users that are subscribed to a category won't be notified when an object in this category becomes visible to them (changes state to "approved and published").

Adding create-notification part to the body of updateobjectstate operation would solve this.

Would this be the right way to add this feature?

P.S. I have played a little bit with it and it works with just a few modifications to kernel/content/operation_definition.php and kernel/state/assign.php.

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

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 17 2025 23:36:47
Script start
Timing: Jan 17 2025 23:36:47
Module start 'layout'
Timing: Jan 17 2025 23:36:47
Module start 'content'
Timing: Jan 17 2025 23:36:48
Module end 'content'
Timing: Jan 17 2025 23:36:48
Script end

Main resources:

Total runtime1.1508 sec
Peak memory usage4,096.0000 KB
Database Queries46

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0063 587.9141152.6250
Module start 'layout' 0.00630.0030 740.539139.4531
Module start 'content' 0.00931.1400 779.9922474.5859
Module end 'content' 1.14930.0015 1,254.57818.1641
Script end 1.1508  1,262.7422 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00310.2710160.0002
Check MTime0.00130.1166160.0001
Mysql Total
Database connection0.00080.067410.0008
Mysqli_queries1.111596.5819460.0242
Looping result0.00040.0332440.0000
Template Total1.115496.920.5577
Template load0.00190.166820.0010
Template processing1.113596.755820.5568
Template load and register function0.00010.007810.0001
states
state_id_array0.00100.084310.0010
state_identifier_array0.00100.090820.0005
Override
Cache load0.00140.1201150.0001
Sytem overhead
Fetch class attribute can translate value0.00050.040310.0005
Fetch class attribute name0.00060.055420.0003
XML
Image XML parsing0.00040.036910.0004
class_abstraction
Instantiating content class attribute0.00000.000320.0000
General
dbfile0.00070.0637180.0000
String conversion0.00000.000740.0000
Note: percentages do not add up to 100% because some accumulators overlap

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
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
2content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/li.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/li.tplEdit templateOverride template
1content/datatype/view/ezxmltags/ul.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/ul.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 8
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs