How to get the number of tickets in the current queue as part of a reply?

All,

Anyone know how to get the number of tickets with the status ‘new’ from
the current queue as part of a template?

In short, I want to send back a message similar to the default AutoReply
but the an extra line that says:

‘There are currently tickets awaiting processing before yours.’

Thanks in advance,

Mat

something like:
{ my $tickets = RT::Tickets->new( $RT::SystemUser );
$tickets->FromSQL( "Status = ‘new’ AND Queue = ". $Ticket->Queue );
$tickets->Count; }

When you’ll check it, please, add it to the
http://wiki.bestpractical.com/index.cgi?CodeSnippetsOn 11/30/05, Matthew Sullivan matthew@sorbs.net wrote:

All,

Anyone know how to get the number of tickets with the status ‘new’ from
the current queue as part of a template?

In short, I want to send back a message similar to the default AutoReply
but the an extra line that says:

‘There are currently tickets awaiting processing before yours.’

Thanks in advance,

Mat


http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Be sure to check out the RT Wiki at http://wiki.bestpractical.com

Download a free sample chapter of RT Essentials from O’Reilly Media at http://rtbook.bestpractical.com

WE’RE COMING TO YOUR TOWN SOON - RT Training in Amsterdam, Boston and
San Francisco - Find out more at http://bestpractical.com/services/training.html

Best regards, Ruslan.

queue as part of a reply?

something like:
{ my $tickets = RT::Tickets->new( $RT::SystemUser );
$tickets->FromSQL( "Status = ‘new’ AND Queue = ". $Ticket->Queue );
$tickets->Count; }

When you’ll check it, please, add it to the
http://wiki.bestpractical.com/index.cgi?CodeSnippets

Spot on! :wink:

Added to the wiki, and thanks.

Best regards,

Mat