[rt-users] Sorting records in report using Weekly.html

Tom Lichti tom at redpepperracing.com
Wed Feb 19 14:50:51 EST 2003


Man, I must be really obtuse, because I can't get this thing to work. How 
do I sort by Ticket ID in this report? I tried the TicketsSortOrder method, 
Orderby method, and again, I can't seem to find the right combination. I 
assume it should go somewhere in here:

    my $tickets = new RT::Tickets($RT::SystemUser);

    $tickets->LimitTransactionDate( VALUE => $startobj->ISO, OPERATOR => 
'>=');
    $tickets->LimitTransactionDate( VALUE => $endobj->ISO, OPERATOR => 
'<=');
    $tickets->LimitStatus( VALUE => 'open', OPERATOR => '=');
    while (my $ticket = $tickets->Next()) {
    my $transes = $ticket->Transactions();
    $transes->Limit(    FIELD => 'Created',
                        VALUE => $startobj->ISO,
                        OPERATOR => '>=',
                        ENTRYAGGREGATOR=> 'AND' );

    $transes->Limit(    FIELD => 'Created',
                        VALUE => $endobj->ISO,
                        OPERATOR => '<=',
                        ENTRYAGGREGATOR => 'AND');
    $transes->_DoSearch();
    next unless ($transes->Count > 0);

But I'm damned if I can figure it out. Looking at some of the other places 
where the order is set has only confused me more.

Help!

Thanks
Tom





More information about the rt-users mailing list