[dev] About Event "ArticleCreate" and "TicketCreate"
Eduardo Raffoul
eraffoul at gmail.com
Wed Nov 28 10:00:30 GMT 2007
Hi everyone,
I'm developing a functionality that alerts (send a notification) some users
when a high priority ticket is created or moved into some queue. But i have
this problem:
I am triggering the function when the Event "TicketCreate" (or "MoveTicket")
occurs, and if the ticket accomplish the rules in the database (priorityID
and queueID) it sends the notifications to the configured recipients. When
it occurs after a "MoveTicket" event, runs fine and sends the notification
properly. But the problem is that OTRS uses the article table to create the
notification (build the subject and the body), and the creation of the
article row to the new ticket (in the database) occurs after the action
triggered by "TicketCreate". In other words,
1.- A ticket is created and TicketCreate triggers my Event response.
2.- My function tries to look into the article table with the given TicketID
(but there is still no article row for that TicketID) to build the subject
and body of the notification.
3.- My function sends an incomplete notification (with no subject and no
body).
4.- After my event response function completes its job, the article row to
that TicketID is created in the database (thats why it works fine with
"MoveTicket" event, it finds an article row to the given TicketID).
I am thinking in trigger my function after "ArticleCreate" instead of
"TicketCreate", but now the problem is ¿how i know that an article was
created because of a ticket was created before?
Hope to be clear :-)
Thanks, Eduardo Raffoul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.otrs.org/pipermail/dev/attachments/20071128/bcd6b34b/attachment.html
More information about the dev
mailing list