[rt-users] listing history in template used by scrip

Phil Homewood pdh at bestpractical.com
Wed Mar 17 17:08:28 EST 2004


Coleman, Rebecca wrote:
> is there a way to list the entire history of a ticket in an auto generated
> email that rt sends out?  i know how to create templates and then use them
> in scrips, so i guess the question is more how do i get the entire history
> to list in a template?

With the caveat that this is easy to snowball out of
control if you have users who reply without trimming
excess content, you should be able to do something like

my $Transactions = $Ticket->Transactions;
while ( my $Transaction = $Transactions->Next ) {
        # do something with $Transaction->Content or whatever
}

and you might even glean some inspiration from the way the
web interface does it, see Ticket/Elements/ShowHistory ...
-- 
»|« http://www.bestpractical.com/rt  -- Trouble Ticketing. Free.



More information about the rt-users mailing list