[rt-users] Modifying Results.rdf

Drew Hahn dhahn at newsroomsolutions.com
Fri Mar 18 16:51:22 EDT 2011


Hi All,



In Search/Results.rdf, I’d like to modify the line below marked with >>>>>:



    while ( my $Ticket = $Tickets->Next()) {

        my $creator_str = $m->scomp('/Elements/ShowUser', User =>
$Ticket->CreatorObj);

        $creator_str =~ s/[\r\n]//g;

        $rss->add_item(

          title       =>  $Ticket->Subject || loc('No Subject'),

          link        =>
RT->Config->Get('WebURL')."Ticket/Display.html?id=".$Ticket->id,

>>>>>     description => $Ticket->Transactions->First->Content,

          dc          => { creator => $creator_str,

                           date => $Ticket->CreatedObj->RFC2822,

                         },

          guid        => $Ticket->Queue . '_' . $Ticket->id,

        );

    }



What I’m hoping to see in the RSS is either the last Correspondence or
Comment in the ticket, or the Create statement if it is new.  I can change
the command to $Ticket->Transactions->Last->Content but it will simply print
out “This transaction appears to have no content” if the last action was
something like an ownership change.



I believe what I ultimately want to do is show the Content for the last
Transaction where the Type is either Correspond, Comment or Create.  Any
documentation pointers or code snippets that will help get me there are
appreciated.



Thanks!



--drew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20110318/ac249e6e/attachment.htm>


More information about the rt-users mailing list