Victor Danilchenko a écrit :
What the subject sayd. Specifically, I need to be able to
include the body of a message (either the first or the last
correspondence on a ticket) into the notification that goes out upon
queue change. I have been going over the code and the docs, and the one
datum I can’t figure out how to get from $Ticket, is the message bodies.
Can anyone help, please?
I think messages are attached to transactions of tickets. Maybe should
you look at share/html/Ticket/Elements/ShowHistory and
share/html/Ticket/Elements/ShowTransaction, it might help.
Thanks. That was a good suggestion -- I found the Attachments
method for Transaction class. Unfortunately, it seems to return only the
attachments pertaining to that transaction – so if the transaction is
correspondence, I get valid attachments I can enumerate through
(Transaction->Attachments()->First() returns a value). However, if the
transaction is queue change, I get no attachments returned that way, and
that’s exactly when I need the attachments.
note the docs for Attachments_Overlay class have an interesting
statement:
“This module should never be called directly by client code. it’s an
internal module which should only be accessed through exported APIs in
Ticket, Queue and other similar objects.”
It sounds like there should be a way to access Attachments from
a Ticket object, which is exactly what I want – but there is no
Ticket::Attachments method, bnor anything resembling it!. I kept going
through the code, and i cannot find anything useful.
I am guessing that there has to be either a way to create
Attachments object initialized with the attachments for a given Ticket
object, or a way to just get the Attachments pbject returned by Ticker
object straight up. Any ideas on how to do it?
| Victor Danilchenko | Catch a man a fish, and you can sell it to him; |
| danilche@cs.umass.edu | teach him to fish, and you’ll ruin a wonderful |
| CSCF | 5-4231 | business opportunity. |