Notification of new ticket


#1

Hi,
I’m wondering where the best place to add in a script to be executed upon creation of a new ticket.
What I want to execute is
lynx -dump http://www.example.com/script.html?op=notify&newticket={{newticketnumber}}

i.e., notify another web server what the latest ticket number is.

Where’s the best place to put this, obviously I want it as soon after creation of a new ticket as possible.

I’m WAY too busy to scan through it myself at the moment, any ideas?

Thanks,

-Feargal.

_/_/_/ _/_/_/  _/_/_/  Feargal Reilly,

_/ _/ / / Systems Administrator,
/ / //// The Communications Interactive Agency.
//
/ //
/ _/ _/ Phone: +353-86-8157621.

If you can read this, you’ve scrolled too far.


#2

While we’re talking about this - has anyone created something that will
e-mail a queue owner, or queue group, that a new ticket has arrived in the
queue? Including the ticket info would be super, but just a “Hey, theres
a new ticket in the ‘general’ queue” would be what I’m after …

Is this going to be a feature of 2.0?

Thanks!On Tue, 19 Dec 2000, Feargal Reilly wrote:

Hi,
I’m wondering where the best place to add in a script to be executed upon creation of a new ticket.
What I want to execute is
lynx -dump http://www.example.com/script.html?op=notify&newticket={{newticketnumber}}

i.e., notify another web server what the latest ticket number is.

Where’s the best place to put this, obviously I want it as soon after creation of a new ticket as possible.

I’m WAY too busy to scan through it myself at the moment, any ideas?

Thanks,

-Feargal.

_/_/_/ _/_/_/  _/_/_/  Feargal Reilly,

_/ _/ / / Systems Administrator,
/ / //// The Communications Interactive Agency.
//
/ //
/ _/ _/ Phone: +353-86-8157621.

If you can read this, you’ve scrolled too far.


rt-users mailing list
rt-users@lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-users

Mike Dugas mad@phobia.net


#3

| While we’re talking about this - has anyone created something that will
| e-mail a queue owner, or queue group, that a new ticket has arrived in the
| queue? Including the ticket info would be super, but just a “Hey, theres
| a new ticket in the ‘general’ queue” would be what I’m after …
±–>8

I patched ours to send zephyrgrams. The hook is in
lib/rt/database/manipulate.pm, sub add_new_request, after the call to
add_transaction.

| Is this going to be a feature of 2.0?
±–>8

2.0 will support “scrips” which allow you to do arbitrary things at
arbitrary points in ticket processing, I believe.

brandon s. allbery [os/2][linux][solaris][japh] allbery@kf8nh.apk.net
system administrator [WAY too many hats] allbery@ece.cmu.edu
electrical and computer engineering KF8NH
carnegie mellon university [“better check the oblivious first” -ke6sls]


#4

±----
| While we’re talking about this - has anyone created something that will
| e-mail a queue owner, or queue group, that a new ticket has arrived in the
| queue? Including the ticket info would be super, but just a “Hey, theres
| a new ticket in the ‘general’ queue” would be what I’m after …
±–>8

I patched ours to send zephyrgrams. The hook is in
lib/rt/database/manipulate.pm, sub add_new_request, after the call to
add_transaction.

Care to share? I’m far from a perl geek. :slight_smile:

Thx.

Mike Dugas mad@phobia.net


#5

I would like this as well. I’m not looking for every transaction to email
the queue owner or queue group, but at least an email that said there is a
new ticket, and the details should be easy enough to include in there. If
it’s not already done, I could do it, but I’d rather now repeat work.

-Brandon


#6

2.0 will support “scrips” which allow you to do arbitrary things at
arbitrary points in ticket processing, I believe.

Close. for 2.0, the only defined point at which scrips can run
is “just after the transaction has been committed to the database”

For a future version, we’ll add more hools…


brandon s. allbery [os/2][linux][solaris][japh] allbery@kf8nh.apk.net
system administrator [WAY too many hats] allbery@ece.cmu.edu
electrical and computer engineering KF8NH
carnegie mellon university [“better check the oblivious first” -ke6sls]


rt-users mailing list
rt-users@lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-users

jesse reed vincent – root@eruditorum.orgjesse@fsck.com
70EBAC90: 2A07 FC22 7DB4 42C1 9D71 0108 41A3 3FB3 70EB AC90

They’ll take my private key when they pry it from my cold dead fingers!


#7

Hi all…

I would like this as well. I’m not looking for every transaction to email
the queue owner or queue group, but at least an email that said there is a
new ticket, and the details should be easy enough to include in there. If
it’s not already done, I could do it, but I’d rather now repeat work.

I found something about this problem in the archive of this list and
implemented something for our Installation at the University of Zurich.
My code will send an email (template = create_noowner) to a sendmail
alias called “primQUEUENAME”, if the ticket has no owner, which none of
the new tickets will have, unless it’s created by a supporter in the
web or commandline interface.

So I can set for each queue which supporters will get a notification
of a new ticket. We are about thirty supporters, but most of them
are specialists and are only working on tickets given to them by
our primary support staff. But still most of the tickets are in the
same queue and every supporter may follow the transaction history
and add some useful comments…

First I made a change in lib/rt/database/manipulate.pm. You will find the
first four lines in the code and will have to include the following lines.

 if( $in_owner ) {
     &rt::template_mail('give',$in_queue_id,$rt::users{$in_owner}{email},
                        "","", "$serial_num" ,"$transaction_num",
                        "$in_subject", "$in_current_user",'');

 } else {
   &rt::template_mail('create_noowner',$in_queue_id,
                      "prim" . "$in_queue_id","","",
                      "$serial_num", "$transaction_num",
                      "$in_subject", "$in_current_user",'');
 }

Second I made a template called create_noowner in lib/generic_templates
like this (for us in german…):

----------------------------cut-here----------------------
%trans:text_time%: There is a new request.

Transaction: %trans:text%

    Queue: %req:queue_id%
     Area: %req:area%
    Owner: %req:owner%

Requestors: %req:requestors%
Status: %req:status%

There is a new ticket %serial_num% Please take it, give it to
somebody or hope that anybody else will do it…

URL: http://link.to.rtinstallation/rt/webrt.cgi

%trans:content%
----------------------------cut-here----------------------

Third I made a sendmail alias called “prim”+QueueName for each queue like
this

primpcsupport: bill, …
primmacsupport: steve, …

That’s it…

Greetings from Zurich, Switzerland

Michael

PS: Our queues are configured to
Owner: Send email notification of each transaction
Requestor: Send an autoreply on request creation

Michael Hottinger m.hottinger@zi.unizh.ch
Universitaet Zuerich Phone: +41 1 63 54515
Zentrum Informatikdienste Fax: +41 1 63 54505
Winterthurerstr.190, CH-8057 Zuerich
http://www.zi.unizh.ch/services/pc-mac-support/crew/hottinger/


#8

Hi all…

I would like this as well. I’m not looking for every transaction to email
the queue owner or queue group, but at least an email that said there is a
new ticket, and the details should be easy enough to include in there. If
it’s not already done, I could do it, but I’d rather now repeat work.

I found something about this problem in the archive of this list and
implemented something for our Installation at the University of Zurich.
My code will send an email (template = create_noowner) to a sendmail
alias called “primQUEUENAME”, if the ticket has no owner, which none of
the new tickets will have, unless it’s created by a supporter in the
web or commandline interface.

So I can set for each queue which supporters will get a notification
of a new ticket. We are about thirty supporters, but most of them
are specialists and are only working on tickets given to them by
our primary support staff. But still most of the tickets are in the
same queue and every supporter may follow the transaction history
and add some useful comments…

First I made a change in lib/rt/database/manipulate.pm. You will find the
first four lines in the code and will have to include the following lines.

 if( $in_owner ) {
     &rt::template_mail('give',$in_queue_id,$rt::users{$in_owner}{email},
                        "","", "$serial_num" ,"$transaction_num",
                        "$in_subject", "$in_current_user",'');

 } else {
   &rt::template_mail('create_noowner',$in_queue_id,
                      "prim" . "$in_queue_id","","",
                      "$serial_num", "$transaction_num",
                      "$in_subject", "$in_current_user",'');
 }

Second I made a template called create_noowner in lib/generic_templates
like this (for us in german…):

----------------------------cut-here----------------------
%trans:text_time%: There is a new request.

Transaction: %trans:text%

    Queue: %req:queue_id%
     Area: %req:area%
    Owner: %req:owner%

Requestors: %req:requestors%
Status: %req:status%

There is a new ticket %serial_num% Please take it, give it to
somebody or hope that anybody else will do it…

URL: http://link.to.rtinstallation/rt/webrt.cgi

%trans:content%
----------------------------cut-here----------------------

Third I made a sendmail alias called “prim”+QueueName for each queue like
this

primpcsupport: bill, …
primmacsupport: steve, …

That’s it…

Greetings from Zurich, Switzerland

Michael

PS: Our queues are configured to
Owner: Send email notification of each transaction
Requestor: Send an autoreply on request creation

Michael Hottinger m.hottinger@zi.unizh.ch
Universitaet Zuerich Phone: +41 1 63 54515
Zentrum Informatikdienste Fax: +41 1 63 54505
Winterthurerstr.190, CH-8057 Zuerich
http://www.zi.unizh.ch/services/pc-mac-support/crew/hottinger/


#9

Thanks Michael. I did this and I am now getting an email, but it comes in
blank. This is the code I added to lib/database/maniuplate.pm:

if( $in_owner ) {
    &rt::template_mail('give',$in_queue_id,$rt::users{$in_owner}{email},
                       "","", "$serial_num" ,"$transaction_num",
                       "$in_subject", "$in_current_user",'');

}

- Added BVP 12/20/00

  else {
   &rt::template_mail('newticket',$in_queue_id,

‘brandon@xmission.com’,"","",
"$serial_num", “$transaction_num”,
“NewTicket: $in_subject”, “$in_current_user”,’’);
}

- End of Added Code

and this is the content of the newticket file (placed in
/etc/templates/queues/[each queue]/newticket and
in lib/generic_templates/newticket):

[root@is office]# more newticket
%rtname% Request #%serial_num% was created by %actor%. Please take it, give
it to
somebody or hope that anybody else will do it…

Here are the details:

Last Change: %trans:text%

   Queue: %req:queue_id%
    Area: %req:area%               
   Owner: %req:owner%

Requestors: %req:requestors%
Status: %req:status%
URL:
http://tickets.superstats.com/rt/webrt.cgi?serial_num=%serial_num%&display=H
istory

%trans:content%
%content%

Any ideas why the emails show up blank (just the - Managed by Request
Tracker line)?

-Brandon


#10

I think what he neglected to mention was that you then need to copy that
template into your ~rt/etc/templates/queues/queuename directory…

:wink: I found that out the hard way, but its working great now.On Wed, 20 Dec 2000, Brandon Pulsipher wrote:

Thanks Michael. I did this and I am now getting an email, but it comes in
blank. This is the code I added to lib/database/maniuplate.pm:

if( $in_owner ) {
    &rt::template_mail('give',$in_queue_id,$rt::users{$in_owner}{email},
                       "","", "$serial_num" ,"$transaction_num",
                       "$in_subject", "$in_current_user",'');

}

- Added BVP 12/20/00

  else {
   &rt::template_mail('newticket',$in_queue_id,

‘brandon@xmission.com’,"","",
"$serial_num", “$transaction_num”,
“NewTicket: $in_subject”, “$in_current_user”,’’);
}

- End of Added Code

and this is the content of the newticket file (placed in
/etc/templates/queues/[each queue]/newticket and
in lib/generic_templates/newticket):

[root@is office]# more newticket
%rtname% Request #%serial_num% was created by %actor%. Please take it, give
it to
somebody or hope that anybody else will do it…

Here are the details:

Last Change: %trans:text%

   Queue: %req:queue_id%
    Area: %req:area%               
 Subject: %req:subject%
   Owner: %req:owner%

Requestors: %req:requestors%
Status: %req:status%
URL:
http://tickets.superstats.com/rt/webrt.cgi?serial_num=%serial_num%&display=H
istory


%trans:content%
%content%

Any ideas why the emails show up blank (just the - Managed by Request
Tracker line)?

-Brandon

-----Original Message-----
From: Michael Hottinger [mailto:m.hottinger@zi.unizh.ch]
Sent: Wednesday, December 20, 2000 12:17 AM
To: rt-users@lists.fsck.com
Subject: RE: [rt-users] Notification of new ticket

Hi all…

I would like this as well. I’m not looking for every
transaction to email
the queue owner or queue group, but at least an email that
said there is a
new ticket, and the details should be easy enough to include
in there. If
it’s not already done, I could do it, but I’d rather now repeat work.

I found something about this problem in the archive of this list and
implemented something for our Installation at the University
of Zurich.
My code will send an email (template = create_noowner) to a sendmail
alias called “primQUEUENAME”, if the ticket has no owner,
which none of
the new tickets will have, unless it’s created by a supporter in the
web or commandline interface.

So I can set for each queue which supporters will get a notification
of a new ticket. We are about thirty supporters, but most of them
are specialists and are only working on tickets given to them by
our primary support staff. But still most of the tickets are in the
same queue and every supporter may follow the transaction history
and add some useful comments…

First I made a change in lib/rt/database/manipulate.pm. You
will find the
first four lines in the code and will have to include the
following lines.

 if( $in_owner ) {

&rt::template_mail(‘give’,$in_queue_id,$rt::users{$in_owner}{email},
"","", “$serial_num” ,"$transaction_num",
"$in_subject", “$in_current_user”,’’);

 } else {
   &rt::template_mail('create_noowner',$in_queue_id,
                      "prim" . "$in_queue_id","","",
                      "$serial_num", "$transaction_num",
                      "$in_subject", "$in_current_user",'');
 }

Second I made a template called create_noowner in
lib/generic_templates
like this (for us in german…):

----------------------------cut-here----------------------
%trans:text_time%: There is a new request.

Transaction: %trans:text%

    Queue: %req:queue_id%
     Area: %req:area%
  Subject: %req:subject%
    Owner: %req:owner%

Requestors: %req:requestors%
Status: %req:status%

There is a new ticket %serial_num% Please take it, give it to
somebody or hope that anybody else will do it…

URL: http://link.to.rtinstallation/rt/webrt.cgi



%trans:content%
----------------------------cut-here----------------------

Third I made a sendmail alias called “prim”+QueueName for
each queue like
this

primpcsupport: bill, …
primmacsupport: steve, …

That’s it…

Greetings from Zurich, Switzerland

Michael

PS: Our queues are configured to
Owner: Send email notification of each transaction
Requestor: Send an autoreply on request creation



Michael Hottinger
m.hottinger@zi.unizh.ch
Universitaet Zuerich Phone:
+41 1 63 54515
Zentrum Informatikdienste Fax:
+41 1 63 54505
Winterthurerstr.190, CH-8057 Zuerich
http://www.zi.unizh.ch/services/pc-mac-support/crew/hottinger/


rt-users mailing list
rt-users@lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-users


rt-users mailing list
rt-users@lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-users

Mike Dugas mad@phobia.net


#11

Sorry, nix that, I neglected to read your post fully. :0On Wed, 20 Dec 2000, Mike Dugas wrote:

I think what he neglected to mention was that you then need to copy that
template into your ~rt/etc/templates/queues/queuename directory…

:wink: I found that out the hard way, but its working great now.

On Wed, 20 Dec 2000, Brandon Pulsipher wrote:

Thanks Michael. I did this and I am now getting an email, but it comes in
blank. This is the code I added to lib/database/maniuplate.pm:

if( $in_owner ) {
    &rt::template_mail('give',$in_queue_id,$rt::users{$in_owner}{email},
                       "","", "$serial_num" ,"$transaction_num",
                       "$in_subject", "$in_current_user",'');

}

- Added BVP 12/20/00

  else {
   &rt::template_mail('newticket',$in_queue_id,

‘brandon@xmission.com’,"","",
"$serial_num", “$transaction_num”,
“NewTicket: $in_subject”, “$in_current_user”,’’);
}

- End of Added Code

and this is the content of the newticket file (placed in
/etc/templates/queues/[each queue]/newticket and
in lib/generic_templates/newticket):

[root@is office]# more newticket
%rtname% Request #%serial_num% was created by %actor%. Please take it, give
it to
somebody or hope that anybody else will do it…

Here are the details:

Last Change: %trans:text%

   Queue: %req:queue_id%
    Area: %req:area%               
 Subject: %req:subject%
   Owner: %req:owner%

Requestors: %req:requestors%
Status: %req:status%
URL:
http://tickets.superstats.com/rt/webrt.cgi?serial_num=%serial_num%&display=H
istory


%trans:content%
%content%

Any ideas why the emails show up blank (just the - Managed by Request
Tracker line)?

-Brandon

-----Original Message-----
From: Michael Hottinger [mailto:m.hottinger@zi.unizh.ch]
Sent: Wednesday, December 20, 2000 12:17 AM
To: rt-users@lists.fsck.com
Subject: RE: [rt-users] Notification of new ticket

Hi all…

I would like this as well. I’m not looking for every
transaction to email
the queue owner or queue group, but at least an email that
said there is a
new ticket, and the details should be easy enough to include
in there. If
it’s not already done, I could do it, but I’d rather now repeat work.

I found something about this problem in the archive of this list and
implemented something for our Installation at the University
of Zurich.
My code will send an email (template = create_noowner) to a sendmail
alias called “primQUEUENAME”, if the ticket has no owner,
which none of
the new tickets will have, unless it’s created by a supporter in the
web or commandline interface.

So I can set for each queue which supporters will get a notification
of a new ticket. We are about thirty supporters, but most of them
are specialists and are only working on tickets given to them by
our primary support staff. But still most of the tickets are in the
same queue and every supporter may follow the transaction history
and add some useful comments…

First I made a change in lib/rt/database/manipulate.pm. You
will find the
first four lines in the code and will have to include the
following lines.

 if( $in_owner ) {

&rt::template_mail(‘give’,$in_queue_id,$rt::users{$in_owner}{email},
"","", “$serial_num” ,"$transaction_num",
"$in_subject", “$in_current_user”,’’);

 } else {
   &rt::template_mail('create_noowner',$in_queue_id,
                      "prim" . "$in_queue_id","","",
                      "$serial_num", "$transaction_num",
                      "$in_subject", "$in_current_user",'');
 }

Second I made a template called create_noowner in
lib/generic_templates
like this (for us in german…):

----------------------------cut-here----------------------
%trans:text_time%: There is a new request.

Transaction: %trans:text%

    Queue: %req:queue_id%
     Area: %req:area%
  Subject: %req:subject%
    Owner: %req:owner%

Requestors: %req:requestors%
Status: %req:status%

There is a new ticket %serial_num% Please take it, give it to
somebody or hope that anybody else will do it…

URL: http://link.to.rtinstallation/rt/webrt.cgi



%trans:content%
----------------------------cut-here----------------------

Third I made a sendmail alias called “prim”+QueueName for
each queue like
this

primpcsupport: bill, …
primmacsupport: steve, …

That’s it…

Greetings from Zurich, Switzerland

Michael

PS: Our queues are configured to
Owner: Send email notification of each transaction
Requestor: Send an autoreply on request creation



Michael Hottinger
m.hottinger@zi.unizh.ch
Universitaet Zuerich Phone:
+41 1 63 54515
Zentrum Informatikdienste Fax:
+41 1 63 54505
Winterthurerstr.190, CH-8057 Zuerich
http://www.zi.unizh.ch/services/pc-mac-support/crew/hottinger/


rt-users mailing list
rt-users@lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-users


rt-users mailing list
rt-users@lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-users


Mike Dugas mad@phobia.net


rt-users mailing list
rt-users@lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-users

Mike Dugas mad@phobia.net


#12

Sorry, I figured it out. The files in ~rt/lib/generic_templates/ were owned
by root. I created the file there and then copied it over to the queues
directory. I thought using root was odd but let it go. Turns out the files
in the queues directory need to be owned by rt (and in rt group). Fixed
that and I am good to go now.

-Brandon


#13

Hi Brandon, Mike and others!

Glad to hear that my quick-and-dirty-hack is also working great for you…

There is a nice idea in the template of Brandon:

Queue: %req:queue_id%
Area: %req:area%
Subject: %req:subject%
Owner: %req:owner%
Requestors: %req:requestors%
Status: %req:status%
URL:
http://tickets.superstats.com/rt/webrt.cgi?serial_num=%serial_num%&display=History

I just mailed the URL of RT. Sending the URL of the ticket history is better!

But it seems to work only if my browser is open and authenticated to RT.
Otherwise
I will see the login and the queue after successful login…

I changed my templates now and I’m waiting for the next ticket to see if it
will
work…

Greetinx from Switzerland

Michael

Michael Hottinger m.hottinger@zi.unizh.ch
Universitaet Zuerich Phone: +41 1 63 54515
Zentrum Informatikdienste Fax: +41 1 63 54505
Winterthurerstr.190, CH-8057 Zuerich
http://www.zi.unizh.ch/services/pc-mac-support/crew/hottinger/