[rt-users] Multiple TAGs?

Bruce Campbell bruce_campbell at ripe.net
Mon Dec 9 09:18:06 EST 2002


On Mon, 9 Dec 2002, Nils Ketelsen wrote:

> At 12:55 09.12.2002 +0000, Andy Coates wrote:
>
> >I was hoping you could change the tag on a dynamic basis, e.g. for queue
> >FOO it would be [FOO #xxx], or queue BAR would be [BAR #xxx].  To set
> >such a tag, an extra field could be stored within the Queue properties,
> >and so on.
>
> Thats a bad Idea, because when you changed a Ticket from Queue A to Queue B
> the user couldn't send an answer to his initial E-Mail anymore. If the
> Queue-Name is in the subject the requestor has to know which Queue the
> request currently is in.

Well, its still a Bad Idea (tm), but not for that reason.  As the ticket
numbers are unique irrespective of which queue, all that needs to be in
the subject line is a valid name for one of your queues, and you need to
change your handling of incoming message from a simple comparision against
$RT::rtname :

	my( $rtname, $ticketnum ) = ( lc($1_, $2 ) if( $subject =~ /\[(\S+)\s+(\d+)\]/ );
	if( lc($RT::rtname) eq $rtname ){
		...

to an iteration through the valid queues, ie:

	my( $rtname, $ticketnum ) = ( lc($1_, $2 ) if( $subject =~ /\[(\S+)\s+(\d+)\]/ );
	my $foundflag = 0;
	my $queues = RT::Queues->new( $RT::SystemUser );
	while( my $queue = $queues->Next ){
		$foundflag = 1 if( lc($queue->Name) eq $rtname );
	}

> Additionally the tags wouldn't be unique anymore (how many "general" queues
> are out there?).

Correct.

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




More information about the rt-users mailing list