[rt-users] auto assign owner to queues

Gene LeDuc gleduc at mail.sdsu.edu
Fri Jul 10 11:31:33 EDT 2009


testwreq wreq wrote:
> Hello, I am new to the RT system. Can some one please tell me how should 
> I default an owner to a queue?
>  
> All the tickets were coming to the general queue when users submitted 
> tickets using email to rt at domain.com <mailto:rt at domain.com>. I created 
> an email alias rt-web at domain.com <mailto:rt-web at domain.com> with -queue 
> as web. Now all the emailed tickets get generated in the web queue. I 
> would like to know how I can default an owner to this queue?
>  
> I wrote a simple scrip that assigns an owner to the web queue. But the 
> problem is that RT generates a correspondence when the ticket is created 
> with NOBODY as owner, and then it generates a second correspondence that 
> it has assigned the ticket. I want to avoid the second communication. 
> For this reason, I am wondering if there is a way that I can default an 
> owner to a queue?

This should work for you:
1. In your web queue, create a copy of the global notify template that 
the on-create scrip is using.  Give it the same name as the global template.
2. Edit the new template and put a line of perl at the beginning that 
assigns the appropriate owner to the ticket without creating an 
ownership change transaction.  Look on the wiki for an example that uses 
Set(Field=>'Owner',Value=>$owner,RecordTransaction=>0).

Why this should work:
Step 1 tells RT to use the web queue template instead of the global 
template (because they have the same name).
Step 2 sets the ownerdhip of the ticket without creating a new 
transaction and sends out your notification.  Using the 
RecordTransaction=>0 option of the Set() call instead of the SetOwner() 
call prevents the ownership-change scrip from firing and sending a 
second notification.

Have fun with RT!

Regards,
Gene




More information about the rt-users mailing list