Q: Writing a transaction template: {$Transaction->Content()}

Greetings,

I am using RT3.4, and am trying to write a resolve ticket action 

email template that will include:

-all correspondence for the ticket
-NOT include comments on the ticket
-will include the correspondence entered at the time of the resolve action

My template (built from the default) includes the
{$Transaction->Content()} line which does seem to list the ticket
correspondence in other templates. However, when this template is
resolved, it is populated with a message stating “no content for this
ticket”.

Can anyone see what I am doing wrong? The same call used in other
templates works perfectly. I have included the content of the template
below. Why does the {$Transaction->Content()} come up with no content?

  Greetings,

  According to our records, your request:

{$Ticket->Subject}
has been resolved. If you have any further questions or concerns
regarding this issue, please send a message to:

  {$Ticket->QueueObj->CorrespondAddress()}

  Thank You,

Pediatrics Computing

{$Transaction->Content()}

Thanks in advance for your ideas,

John H. Nyhuis
Sr. Computer Specialist
Dept. of Pediatrics
HS RR338, Box 356320
University of Washington
Desk: (206)-685-3884
cabal@u.washington.edu

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1On Thu, 21 Sep 2006 at 09:52 (-0700), John H. Nyhuis wrote:

I am using RT3.4, and am trying to write a resolve ticket action
email template that will include:

-all correspondence for the ticket
-NOT include comments on the ticket
-will include the correspondence entered at the time of the resolve action

My template (built from the default) includes the
{$Transaction->Content()} line which does seem to list the ticket
correspondence in other templates. However, when this template is
resolved, it is populated with a message stating “no content for this
ticket”.

Can anyone see what I am doing wrong? The same call used in other
templates works perfectly. I have included the content of the template
below. Why does the {$Transaction->Content()} come up with no content?

John,

A ‘resolve’ transaction itself usually has no ‘transaction content’.
Whereas, if this were, say, ‘On Correspondence’, then the content would be
the actual correspondence that triggered the scrip.

If you really want to include, say, the contents of the last
correspondence before the ticket was resolved, then I believe you’ll have
to loop through the ticket’s attachments to find it. At least that’s what
I wound up doing.

Mike

Mike Friedman IST/System and Network Security
mikef@berkeley.edu 2484 Shattuck Avenue
1-510-642-1410 University of California at Berkeley
Socrates and Berkeley Scholars Web Hosting Services Have Been Retired | Web Platform Services http://security.berkeley.edu

-----BEGIN PGP SIGNATURE-----
Version: PGP 6.5.8

iQA/AwUBRRNkv60bf1iNr4mCEQKrXQCcDFFNAczqatOhnbm+oIlT5AHVY4YAnR1n
re1EQ3CuwWwIdw8cI4XLofx8
=OD4o
-----END PGP SIGNATURE-----

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thu, 21 Sep 2006 at 21:21 (-0700), I said:

If you really want to include, say, the contents of the last
correspondence before the ticket was resolved, then I believe you’ll
have to loop through the ticket’s attachments to find it. At least
that’s what I wound up doing.

Slight correction:

Actually, what I do is include the initial correspondence that created the
ticket, since this is what the Requestor (who is receiving the resolution
email) would recognize.

So, the relevant extract from my template, where I pick up that initial
correspondence, looks like this:

{
$Transactions = $Ticket->Transactions;
$Transaction = $Transactions->First;
$Transaction->Content();
}

Of course, you may want to do something else.

Mike

Mike Friedman IST/System and Network Security
mikef@berkeley.edu 2484 Shattuck Avenue
1-510-642-1410 University of California at Berkeley
Socrates and Berkeley Scholars Web Hosting Services Have Been Retired | Web Platform Services http://security.berkeley.edu

-----BEGIN PGP SIGNATURE-----
Version: PGP 6.5.8

iQA/AwUBRRNm+K0bf1iNr4mCEQJEMQCfVwWhttqI4jMPLBKq4b1I4eBiu3IAoKJL
vQaE2Jh10f7q0KGJgOoPKXc3
=gOj4
-----END PGP SIGNATURE-----

Mike,

We merely modified the "Resolve" template to include our CF 

“Description” (a more concise description of the problem) and the
resolution comment (made by the owner at time of resolution) in the body
of the resolve e_mail. Works great for us.

Kenn
LBNL

Mike Friedman wrote:

John;
What you need is to check the wiki …
http://wiki.bestpractical.com/index.cgi?AddTicketHistoryToMail
it worked for me, you can modify to how you need it.
Roy

John H. Nyhuis wrote: