Ticket Event Module¶
Ticket event modules are running right after a ticket or an article action took place.
Per convention these modules are located in the directory
Kernel/System/Ticket/Event. A ticket event module needs only two functions:
Run(). The method
Run() receives at least the parameters
Data. The parameter
Data is a referecne to a hash.
It contains data of the ticket and, in the case of article related events, also data of the article.
Ticket Event Module Code Example¶
See the files in
Kernel/System/Ticket/Event folder of the source code.
Ticket Event Module Configuration Example¶
See the settings in
Kernel/Config/Files/XML/Ticket.xml that are starting with the name
Ticket Event Module Use Case Example¶
- A ticket should be unlocked after a move action
- This standard feature has been implemented with the ticket event module
Kernel::System::Ticket::Event::ForceUnlock. When this feature is not wanted, then it can be turned off by unsetting the system configuration entry
- Perform extra cleanup action when a ticket is deleted
- A customized OTOBO might hold non-standard data in additional database tables. When a ticket is deleted then this additional data needs to be deleted. This functionality can be achieved with a ticket event module listening to
- New tickets should be twittered
- A ticket event module listening to
TicketCreatecan send out tweets.
Ticket and Article Events¶
Available ticket events:
Available article events: