[rt-users] Reverse (date) order in Ticket History

Bruce Campbell bruce_campbell at ripe.net
Wed Feb 13 11:07:52 EST 2002


On Wed, 13 Feb 2002, Beachey, Kendric wrote:

> my $Transactions = $Ticket->Transactions;
>
> if ($Ticket->QueueObj->Name == 'webrequest')

'==' is a binary numeric comparison, and in the above essentially resolves
to 'if( 1 == 1 )'.  Try instead:

	if( $Ticket->QueueObj->Name =~ /webrequest/i )

Although I'd make it easier for the behaviour to be extended to other
queues in future, and:

	my $queues_reverse = "webrequest test example_queue";
	if( $queues_reverse =~ /$Ticket->QueueObj->Name/ )

Regards,


-- 
                             Bruce Campbell                            RIPE
                   Systems/Network Engineer                             NCC
                 www.ripe.net - PGP562C8B1B                      Operations





More information about the rt-users mailing list