Queue length in templates

Hello,

We’ve just set up a new installation of RT3 from the Debian packages. I
have successfully configured the system to log new emails into a queue and
autorespond to the requestor. Which was actually very straightforward,
many thanks :slight_smile:

What I want to do now is have the autoresponder message include the number
of messages in the queue so that the requestor has some idea of how busy
we are.

I’ve searched the docs and the wiki but I can’t seem to find the right
recipe to retrieve the number of new & open tickets in a given queue.

Can anyone help with a pointer ?

Many thanks,

Simon.

Hello, Simon.
This template part can help.

{

This is template part that return number of tickets

with status ‘open’ or ‘new’

in queue which current ticket belong to.

my $tickets = RT::Tickets->new( $RT::SystemUser );
$tickets->Limit( FIELD => 'queue', VALUE => $Ticket->Queue );
$tickets->Limit( FIELD => 'Status', VALUE => 'open' );
$tickets->Limit( FIELD => 'Status', VALUE => 'new' );
return $tickets->Count();

}

Please report back on success or error I didn’t test it.
Best regards. Ruslan.

Simon Wilcox wrote: