[rt-users] Re: [rt-devel] template_mail('resolve', ...

Christian Kurz Christian.Kurz at planNET.de
Wed Dec 20 08:39:10 EST 2000


On 00-12-20 Jens von Bülow wrote:
> Has anybody modified RT to send out a notification to the requestor when the
> ticket is resolved? Would you mind sharing your modification? Or where would
> be the best place to make the modification?

Based on the modification that Michael Hottinger
<m.hottinger at zi.unizh.ch> made for sending out a mail if a new ticket
is opened I modified now our rt to also send out a mail if a ticket is
closed. 

The problem which I had was that I don't have access to the queue_id
when I resolve the ticket. If anyone has a patch to also have the
queue_id available in the sub resolve in database/manipulate.pm, I would
be very thankful if he would send it to me. First I modified the sub
resolve in database/manipulate.pm. After the line:

|$transaction_num=&update_request($in_serial_num,'status', 'resolved',$in_current_user);

I inserted the following statement to generate the mail:

|    &rt::template_mail('resolved',"queue",
|                       "resolved" . "$in_queue_id","","",
|                       "$in_serial_num", "$transaction_num",
|                       "$in_subject", "$in_current_user",'');

I use queue here as this is a sample for one of the queue names. I would
have preferred if I could use $in_queue in this field, but it would not
work as it was empty. So if anyone has a patch to support $in_queue_id
instead of a hard-coded queue_name this would be good.

Now I create a template called resolved in the dir with the templates
with the following content:

|%trans:text_time%: A ticket has been resolved.
|
|  Transaction: %trans:text%
|
|        Queue: %req:queue_id%
|         Area: %req:area%
|      Subject: %req:subject%
|        Owner: %req:owner%
|   Requestors: %req:requestors%
|       Status: %req:status%
|
|The Ticket %serial_num% has been resolved by %actor%.

|URL: http://link.to.your.rt_installation/

|-------------------------------------------------------------------------
|%trans:content%

After this I added a alias resolved to our MTA configuration which
contain all the people that should get this mail. This setup is now
working here and patches to improve it are appreciate since, I'm not
very familar with perl.

Ciao
     Christian
-- 
Christian Kurz                                   http://www.planNET.de
planNET Systems GmbH                            mailto:info at planNET.de
Schoenfeldstr. 8                              Telefon: +49 721 66 36 0
D-76131 Karlsruhe                           Telefax: +49 721 66 36 199 




More information about the rt-users mailing list