On Wed, Sep 7, 2011 at 12:05 AM, Remi Collet <fed...@famillecollet.com>wrote:

> Le 07/09/2011 01:28, Trey Dockendorf a écrit :
> > I'm attempting to either create a patch , or write a plugin to add a new
> > notification event for tickets, "reassign_tech".  My desired result is
> > to have GLPI only send out notifications on ticket "updates" if a
> > technician is added/removed from a ticket, but not send out
> > notifications for any other "updates".  I see this mentioned
> > here,https://forge.indepnet.net/projects/glpi/wiki/NotificationEvents,
> > but can't seem to find in the code where the update event is
> > distinguished on which type of update is actually occurring.
> >
> > I've thus far got the GLPI interface to have an additional item listed
> > for setting up notifications but can't for the life of me figure out how
> > to add a new event to the core code.  Would this be better accomplished
> > or even possible with the plugin API?  Any advice would be appreciated.
>
> The plugin API allow this.
>
> See the example plugin and the "item_get_events" and "item_get_datas"
> hooks. The event can, then, be raised in any other hook (probably ticket
> "item-update" for your need)
>
> Remi.
>
> >
> > Thanks
> > - Trey
> >
> >
> > _______________________________________________
> > Glpi-dev mailing list
> > Glpi-dev@gna.org
> > https://mail.gna.org/listinfo/glpi-dev
>
>
> _______________________________________________
> Glpi-dev mailing list
> Glpi-dev@gna.org
> https://mail.gna.org/listinfo/glpi-dev
>

K  I see how to add the event now...however what I've achieved
by editing the core code I can't seem to figure out how to implement via
Plugin.  The change I've got working is to ticket.class.php, I add two
additional checks to post_updateItem() to see if the update was a changing
of user or of priority.

The example plugin shows of how to edit getEvents() and makes sense, but is
there a way to edit $mailtype in the post_updateItem() function for Ticket
class?

Thanks
- Trey
_______________________________________________
Glpi-dev mailing list
Glpi-dev@gna.org
https://mail.gna.org/listinfo/glpi-dev

Reply via email to