At Thursday 1/31/2008 02:52 AM, j0ey wrote: >Hey, > >Stephen Turner wrote: >>But I'm guessing you really want to get an accurate list of email >>recipients for the ticket creation? That's quite a bit more tricky >>- you might have to create a fake 'create' transaction, examine its >>scrips and then roll it back. > > >that's exactly what i need. Anyone done this before?
We've done similar for replies/comments, but that's much easier, because there's an existing ticket and transaction object. You'd need to do some serious hacking, I'm afraid. The logic for determining email recipients for a transaction requires a ticket object, and in your case there isn't a ticket object yet because you haven't created it. From what I see, the API doesn't provide for creating a ticket 'create' transaction and rolling it back after you've queried it for email recipients. If you want to look, start at the Create method in Ticket_Overlay.pm and see where the create transaction is generated. If you follow the chain down through Record, Transaction, Scrips, Scrip, ScripAction and finally SendEmail and probably Notify, you'll find the SetRecipients and RemoveInappropriateRecipients methods, which are used to figure out who gets the mail. As I say though, references to the ticket object are embedded in these methods, so you'd have to try to pick out the code that just examines queue watchers etc. Not for the faint of heart! Good luck, Steve Stephen Turner Senior Programmer/Analyst - Client Support Services MIT Information Services and Technology (IS&T) _______________________________________________ http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users Community help: http://wiki.bestpractical.com Commercial support: [EMAIL PROTECTED] Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com
