So a little background... this used to work. Then I rebuilt the system, and all I can think is that I missed a step somewhere.
I have a queue called te-accounts. Vendors/partners email it to get an automated account set up. It's supposed to look at the domain they're emailing from, and add the user to the appropriate group. Then it is supposed to resolve the ticket, and reply to the requestor with a custom template. What's actually happening is that it opens a ticket, immediately resolves the ticket, and responds with the generic resolved template. The user is never added to any groups. I could use a sanity check on the moving parts to make sure I didn't miss something silly. Queue "accounts" allows "Everyone" and "Unpriviledged" to "CreateTicket". /etc/aliases (emails me the original request also, so I can manually intervene when it breaks) te-accounts: accounts-queue, accounts-email accounts-queue: "|/usr/bin/rt-mailgate --queue accounts --action correspond --url https://spdsupport.tivo.com/ --timeout 1000" accounts-email: [email protected]<mailto:[email protected]> accounts queue scrips: Description: Adding new users to group based on domain Condition: On Create Action: User Defined Template: Global Template: Autoreply Stage: TransactionCreate Custom condition <blank> Custom action preparation code: return 1; Custom action cleanup code: # Domains we want to move my $domains = {}; my %domain_map = ( '\...@.*\.?comcast\.com' => "comcast", '\...@.*\.?cox\.com' => "cox", '\...@.*\.?tvworks\.com' => "comcast", '\...@.*\.?tivo\.com' => "support" ); #Check each of our defined domains for a match foreach my $domainKey (keys %domain_map ){ if($self->TicketObj->RequestorAddresses =~ /^.*?${domainKey}/) { # Domain matches - move to the right group my $user = RT::User->new( $RT::SystemUser ); $user->LoadByEmail($self->TicketObj->RequestorAddresses); die "couldn't load user" unless $user->id; my $group = RT::Group->new( $RT::SystemUser ); $group->LoadUserDefinedGroup( $domain_map{$domainKey} ); $group->AddMember($user->id); } } Description: Resolve all tickets in this queue Condition: On create Action: User Defined Template: Global template: group addition Stage: TransactionCreate Custom condition: <blank> Custom action preparation code: return 1; Custom action cleanup code: $self->TicketObj->SetStatus('resolved'); return 1; Global template for resolve account only tickets: Subject: Resolved: {$Ticket->Subject} Your account has been given permissions to the $group queue. Please log in via the web interface at ".$RT::WebURL." to view tickets for the $group queue. Thank you. {$Ticket->QueueObj->CorrespondAddress()} ------------------------------------------------------------------------- {$Transaction->Content()} So what the heck am I missing? ~~ Kimberly McKinnis System Operations Engineer Service Provider Division, TiVo Inc 408-519-9607
_______________________________________________ http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users Community help: http://wiki.bestpractical.com Commercial support: [email protected] Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com
