This message will be sent to

Hey,

i’m searching for a possibility to show the Queue-CCs while creating
(create + correspondend) a ticket without letting the users modify it -
in other words: i know the “ShowOutgoingEMail”-Right :wink:

Any hints?

Greets,
joey

At Tuesday 1/29/2008 12:41 PM, j0ey wrote:

Hey,

i’m searching for a possibility to show the Queue-CCs while creating
(create + correspondend) a ticket without letting the users modify it -
in other words: i know the “ShowOutgoingEMail”-Right :wink:

Any hints?

Greets,
joey

To get the queue ccs (and adminccs), you can simply do:

$QueueObj->CcAddresses and $QueueObj->AdminCcAddresses

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.

Steve

Hey,

Stephen Turner wrote:

i’m searching for a possibility to show the Queue-CCs while creating
(create + correspondend) a ticket without letting the users modify it -
in other words: i know the “ShowOutgoingEMail”-Right :wink:

To get the queue ccs (and adminccs), you can simply do:

$QueueObj->CcAddresses and $QueueObj->AdminCcAddresses

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?

Greettings!

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)