Re: [rt-users] Notification from one queue
On Tue, Aug 16, 2016 at 2:41 AM, Simon Figueirawrote: > That is the issue. Not sure what the script should be. All I want is if > there is a transaction change the queue admin is mailed. > > > Action: Notify AdminCcs -m - RT 4.4 and RTIR training sessions, and a new workshop day! https://bestpractical.com/training * Los Angeles - September 12-14, 2016
Re: [rt-users] Notification from one queue
That is the issue. Not sure what the script should be. All I want is if there is a transaction change the queue admin is mailed. Simon Figueira Systems Administrator From: Matt Zagrabelny [mailto:mzagr...@d.umn.edu] Sent: 15 August 2016 18:28 To: Simon Figueira <sfigue...@geestline.com> Cc: rt-users@lists.bestpractical.com Subject: Re: [rt-users] Notification from one queue Hi Simon, Drill down to the queues, then create your scrip there. Admin -> Queues -> Select Scrips -> Create Your heading should look something like: Create a scrip and add to queue BLAH my URL looks like: https://rt.d.umn.edu/Admin/Scrips/Create.html?Queue=12<https://rt.d.umn.edu/Admin/Scrips/Create.html?Queue=12> This will restrict the scrip to that queue. -m On Mon, Aug 15, 2016 at 10:02 AM, Simon Figueira <sfigue...@geestline.com<mailto:sfigue...@geestline.com>> wrote: 4.2.11 The global scrip shows [cid:image001.png@01D1F799.AEC666B0] Enabling it would make it global and not just one queue. Simon Figueira Systems Administrator From: Matt Zagrabelny [mailto:mzagr...@d.umn.edu<mailto:mzagr...@d.umn.edu>] Sent: 15 August 2016 15:53 To: Simon Figueira <sfigue...@geestline.com<mailto:sfigue...@geestline.com>> Cc: rt-users@lists.bestpractical.com<mailto:rt-users@lists.bestpractical.com> Subject: Re: [rt-users] Notification from one queue Just apply the scrip to the queue. What version of RT are you using? -m On Mon, Aug 15, 2016 at 9:32 AM, Simon Figueira <sfigue...@geestline.com<mailto:sfigue...@geestline.com>> wrote: I want to set up a notification when a custom field is changed in just one queue. I see you can do it globally in scrips. I also see you need to create a template at the queue level to do this but I am not sure what script I would need to use. Thanks Simon Figueira Systems Administrator This e-mail and any files transmitted with it are confidential and intended solely for the use of the individual to whom it is addressed. It is Geest Line policy that the Company only enter into obligations, warranties and representations which are signed in hard copy form by an authorised individual. This email message has been swept for the presence of computer viruses but Internet communications are not guaranteed to be secure or virus-free. Email to and from Geest Line is monitored for operational and business reasons. Geest Line Limited - Registered in England No. 266840 Registered Office: Eagle Point, Little Park Farm Road, Fareham, Hants PO15 5TD. Business is transacted under BIFA STC 2005A, copy of terms available here: http://www.bifa.org/_Attachments/Resources/1105_S4.pdf<http://www.bifa.org/_Attachments/Resources/1105_S4.pdf> - RT 4.4 and RTIR Training Sessions https://bestpractical.com/training<https://bestpractical.com/training> * Los Angeles - September, 2016 - RT 4.4 and RTIR training sessions, and a new workshop day! https://bestpractical.com/training * Los Angeles - September 12-14, 2016
Re: [rt-users] Notification from one queue
Hi Simon, Drill down to the queues, then create your scrip there. Admin -> Queues -> Select Scrips -> Create Your heading should look something like: Create a scrip and add to queue BLAH my URL looks like: https://rt.d.umn.edu/Admin/Scrips/Create.html?Queue=12 This will restrict the scrip to that queue. -m On Mon, Aug 15, 2016 at 10:02 AM, Simon Figueira <sfigue...@geestline.com> wrote: > 4.2.11 > > > > The global scrip shows > > > > > > Enabling it would make it global and not just one queue. > > > > > > *Simon Figueira* > Systems Administrator > > > > > > > > > > > *From:* Matt Zagrabelny [mailto:mzagr...@d.umn.edu] > *Sent:* 15 August 2016 15:53 > *To:* Simon Figueira <sfigue...@geestline.com> > *Cc:* rt-users@lists.bestpractical.com > *Subject:* Re: [rt-users] Notification from one queue > > > > Just apply the scrip to the queue. > > What version of RT are you using? > > -m > > > > On Mon, Aug 15, 2016 at 9:32 AM, Simon Figueira <sfigue...@geestline.com> > wrote: > > I want to set up a notification when a custom field is changed in just one > queue. I see you can do it globally in scrips. I also see you need to > create a template at the queue level to do this but I am not sure what > script I would need to use. > > > > Thanks > > > > *Simon Figueira* > Systems Administrator > > > > > > > > > > > > -- > > This e-mail and any files transmitted with it are confidential and > intended solely for the use of the individual to whom it is addressed. It > is Geest Line policy that the Company only enter into obligations, > warranties and representations which are signed in hard copy form by an > authorised individual. This email message has been swept for the presence > of computer viruses but Internet communications are not guaranteed to be > secure or virus-free. Email to and from Geest Line is monitored for > operational and business reasons. Geest Line Limited - Registered in > England No. 266840 Registered Office: Eagle Point, Little Park Farm Road, > Fareham, Hants PO15 5TD. Business is transacted under BIFA STC 2005A, copy > of terms available here: http://www.bifa.org/_ > Attachments/Resources/1105_S4.pdf > -- > > > - > RT 4.4 and RTIR Training Sessions https://bestpractical.com/training > * Los Angeles - September, 2016 > > > - RT 4.4 and RTIR training sessions, and a new workshop day! https://bestpractical.com/training * Los Angeles - September 12-14, 2016
Re: [rt-users] Notification from one queue
4.2.11 The global scrip shows [cid:image001.png@01D1F70E.7CFC7E20] Enabling it would make it global and not just one queue. Simon Figueira Systems Administrator From: Matt Zagrabelny [mailto:mzagr...@d.umn.edu] Sent: 15 August 2016 15:53 To: Simon Figueira <sfigue...@geestline.com> Cc: rt-users@lists.bestpractical.com Subject: Re: [rt-users] Notification from one queue Just apply the scrip to the queue. What version of RT are you using? -m On Mon, Aug 15, 2016 at 9:32 AM, Simon Figueira <sfigue...@geestline.com<mailto:sfigue...@geestline.com>> wrote: I want to set up a notification when a custom field is changed in just one queue. I see you can do it globally in scrips. I also see you need to create a template at the queue level to do this but I am not sure what script I would need to use. Thanks Simon Figueira Systems Administrator This e-mail and any files transmitted with it are confidential and intended solely for the use of the individual to whom it is addressed. It is Geest Line policy that the Company only enter into obligations, warranties and representations which are signed in hard copy form by an authorised individual. This email message has been swept for the presence of computer viruses but Internet communications are not guaranteed to be secure or virus-free. Email to and from Geest Line is monitored for operational and business reasons. Geest Line Limited - Registered in England No. 266840 Registered Office: Eagle Point, Little Park Farm Road, Fareham, Hants PO15 5TD. Business is transacted under BIFA STC 2005A, copy of terms available here: http://www.bifa.org/_Attachments/Resources/1105_S4.pdf<http://www.bifa.org/_Attachments/Resources/1105_S4.pdf> - RT 4.4 and RTIR Training Sessions https://bestpractical.com/training<https://bestpractical.com/training> * Los Angeles - September, 2016 - RT 4.4 and RTIR Training Sessions https://bestpractical.com/training * Los Angeles - September, 2016
Re: [rt-users] Notification from one queue
Just apply the scrip to the queue. What version of RT are you using? -m On Mon, Aug 15, 2016 at 9:32 AM, Simon Figueirawrote: > I want to set up a notification when a custom field is changed in just one > queue. I see you can do it globally in scrips. I also see you need to > create a template at the queue level to do this but I am not sure what > script I would need to use. > > > > Thanks > > > > *Simon Figueira* > Systems Administrator > > > > > > > > > > > > -- > This e-mail and any files transmitted with it are confidential and > intended solely for the use of the individual to whom it is addressed. It > is Geest Line policy that the Company only enter into obligations, > warranties and representations which are signed in hard copy form by an > authorised individual. This email message has been swept for the presence > of computer viruses but Internet communications are not guaranteed to be > secure or virus-free. Email to and from Geest Line is monitored for > operational and business reasons. Geest Line Limited - Registered in > England No. 266840 Registered Office: Eagle Point, Little Park Farm Road, > Fareham, Hants PO15 5TD. Business is transacted under BIFA STC 2005A, copy > of terms available here: http://www.bifa.org/_ > Attachments/Resources/1105_S4.pdf > -- > > - > RT 4.4 and RTIR Training Sessions https://bestpractical.com/training > * Los Angeles - September, 2016 > > - RT 4.4 and RTIR Training Sessions https://bestpractical.com/training * Los Angeles - September, 2016
[rt-users] Notification from one queue
I want to set up a notification when a custom field is changed in just one queue. I see you can do it globally in scrips. I also see you need to create a template at the queue level to do this but I am not sure what script I would need to use. Thanks Simon Figueira Systems Administrator This e-mail and any files transmitted with it are confidential and intended solely for the use of the individual to whom it is addressed. It is Geest Line policy that the Company only enter into obligations, warranties and representations which are signed in hard copy form by an authorised individual. This email message has been swept for the presence of computer viruses but Internet communications are not guaranteed to be secure or virus-free. Email to and from Geest Line is monitored for operational and business reasons. Geest Line Limited - Registered in England No. 266840 Registered Office: Eagle Point, Little Park Farm Road, Fareham, Hants PO15 5TD. Business is transacted under BIFA STC 2005A, copy of terms available here: http://www.bifa.org/_Attachments/Resources/1105_S4.pdf - RT 4.4 and RTIR Training Sessions https://bestpractical.com/training * Los Angeles - September, 2016
[rt-users] Notification sent to requestor even when squelched
Hi all, I manage an RT 4.2.11 deployment using Debian Wheezy, Apache 2.2, mod_fcgid Today we had a very concerning issue regarding a notification being sent to a requestor even when it had been explicitly unchecked in the recipients list. At first I didn't believe the user, but then I found this in the log: Jun 22 11:29:08RT:[user.info14] [6157] rt-4.2.11-6157-1434965348-1424.4519-5...@rtdomain.com reques...@address.com is blacklisted by notification checkboxes for this transaction. Skipping Jun 22 11:29:55RT:[user.info14] [6145] rt-4.2.11-6145-1434965395-786.4519-5...@rtdomain.com #4519/69938 - Scrip 59 On Correspond from web Notify Requestor and Ccs Jun 22 11:29:56RT:[user.info14] [6145] rt-4.2.11-6145-1434965395-786.4519-5...@rtdomain.com sent To: reques...@address.com You can see that the requestor address was unchecked, but he was notified anyway. The notificatoin script uses a custom condition to just send the notification when using the web interface, with the possibility of squelching recipients manually. The default behaviour (implicit notification to all requestors even for correspondence by mail) was confusing for my team mates. The only odd thing I can see in the log is that the Blacklisted and the sent to ... entries are written by two different perl processes (PID 6157 and 6145 respectively). That didn't happen when I tried to reproduce the issue (with no success). Does anyone know if that's normal in mod_fcgid? Could it be the cause of the problem? It's a big problem for us if we cannot fully trust the platform to not spread confidential information to unintended recipients. Thank you in advance, Marcos.
Re: [rt-users] Notification sent to requestor even when squelched
On 6/22/15 1:10 PM, Marcos Orallo wrote: It's a big problem for us if we cannot fully trust the platform to not spread confidential information to unintended recipients. Along with Alex's suggestions / questions, it sounds like this workflow would benefit from the comment functionality. Ticket comments allow communication via your internal team (AdminCCs) but do not notify Requestors and Ccs.
Re: [rt-users] Notification sent to requestor even when squelched
On Mon, 22 Jun 2015 19:10:50 +0200 Marcos Orallo m_ora...@yahoo.es wrote: I manage an RT 4.2.11 deployment using Debian Wheezy, Apache 2.2, mod_fcgid Today we had a very concerning issue regarding a notification being sent to a requestor even when it had been explicitly unchecked in the recipients list. At first I didn't believe the user, but then I found this in the log: [snip] There's a 47-second interval between the first and the second of those. Can you show the full log of everything between them? My guess is that the first one was a dry run to list the potential recipients, and the second was the actual submission. This would explain the different process IDs, as well as the different behaviors. You can see that the requestor address was unchecked, but he was notified anyway. The notificatoin script uses a custom condition to just send the notification when using the web interface, with the possibility of squelching recipients manually. The default behaviour (implicit notification to all requestors even for correspondence by mail) was confusing for my team mates. Your wording is confusing. Is this jut the stock Notify Requestor and Ccs action, with a custom condition? - Alex
Re: [rt-users] Notification sent to requestor even when squelched
Hi Alex, Thanks for your reply. My comments inline. 2015-06-22 19:46 GMT+02:00 Alex Vandiver a...@chmrr.net: On Mon, 22 Jun 2015 19:10:50 +0200 Marcos Orallo m_ora...@yahoo.es wrote: I manage an RT 4.2.11 deployment using Debian Wheezy, Apache 2.2, mod_fcgid Today we had a very concerning issue regarding a notification being sent to a requestor even when it had been explicitly unchecked in the recipients list. At first I didn't believe the user, but then I found this in the log: [snip] There's a 47-second interval between the first and the second of those. Can you show the full log of everything between them? That's the full log, nothing in between (syslog, info level). The gap is indeed strange... My guess is that the first one was a dry run to list the potential recipients, and the second was the actual submission. This would explain the different process IDs, as well as the different behaviors. But the blacklisting happened just for that transaction when composing the message, it was not a permanent squelch. So the system didn't know it was blacklisted in the preparation stage... You can see that the requestor address was unchecked, but he was notified anyway. The notificatoin script uses a custom condition to just send the notification when using the web interface, with the possibility of squelching recipients manually. The default behaviour (implicit notification to all requestors even for correspondence by mail) was confusing for my team mates. Your wording is confusing. Is this jut the stock Notify Requestor and Ccs action, with a custom condition? Exactly. This is the custom condition, taken from RT wiki, IIRC. my $trans = $self-TransactionObj; return 0 unless $trans-Type eq Correspond; my $msgattr = $trans-Message-First; return 0 unless $msgattr; return 1 unless $msgattr-GetHeader('Received'); return 0;
Re: [rt-users] Notification sent to requestor even when squelched
Hi Todd, Thank you for the suggestion. However, in this case, it was a Reply with One-Time-CCs, so I guess a Comment is not the best option. Moreover, we don't have control of the mail domain, and you wouldn't believe the bureaucracy and delay to get a mail alias for comments. It's true that our use of the system is not always adapted to the platform, my colleagues want the WebUI to be basically a mail client on steroids. They want all external recipients to be explicit, either when sending a mail from their client, or in the webUI message composing screen. Even if I understand the design of RT, I think a few features would make it come close to what users are most accustomed to in a mail client, and make it more flexible: - Correspondance subject independent from the ticket title. Copied from the transaction that you are replying to. - Default recipients selected based on the sender of the transaction you are replying to, even if they are not the Requestors (with the full list of Requestors available for checking if desired). - One-Time-To. There is an extension for this, but I couldn't make it work properly with RT 4.2. - Preserved To, CC in mail notifications, by setting them to a different value independent from the SMTP envelope. - Show full list of recipients for transactions in History - Collapsible individual transactions in History. Anyway, I should maybe wait for Christmas... :-) Kind regards, Marcos. 2015-06-22 19:54 GMT+02:00 Todd Wade t...@bestpractical.com: On 6/22/15 1:10 PM, Marcos Orallo wrote: It's a big problem for us if we cannot fully trust the platform to not spread confidential information to unintended recipients. Along with Alex's suggestions / questions, it sounds like this workflow would benefit from the comment functionality. Ticket comments allow communication via your internal team (AdminCCs) but do not notify Requestors and Ccs.
Re: [rt-users] Notification for reminders
Am 01.02.2011 13:02, schrieb Kevin Falcone: On Tue, Feb 01, 2011 at 09:55:39AM +0100, Johan Sjöberg wrote: I have created some reminders in our RT system, but we get no notification at the time of the reminder. This means that we have to keep watching the Reminders field at RT at a glance. Is it possible to configure RT to send out a notification e-mail to the admin-cc when a reminder occurs? With bin/rt-crontool you can send an mail to the creator of the reminder. But I think it is not possible to send an mail to AdminCc of the ticket. This isn't a built-in feature of reminders, but you could use a dashboard to do it -kevin As far as I know you can't use dashboards for that. For example you have to create a search like 'tickets of type reminder where due within last hour' and put this in an dashboard. But you would then receive the dashboard even if the search result returns no tickets. But maybe this would be a nice feature that you have an option per dashboard where you can say if dashboards where all searches are empty should be send or not. ;-)
[rt-users] Notification for reminders
Hi. I have created some reminders in our RT system, but we get no notification at the time of the reminder. This means that we have to keep watching the Reminders field at RT at a glance. Is it possible to configure RT to send out a notification e-mail to the admin-cc when a reminder occurs? /Johan
Re: [rt-users] Notification for reminders
On Tue, Feb 01, 2011 at 09:55:39AM +0100, Johan Sjöberg wrote: I have created some reminders in our RT system, but we get no notification at the time of the reminder. This means that we have to keep watching the Reminders field at RT at a glance. Is it possible to configure RT to send out a notification e-mail to the admin-cc when a reminder occurs? This isn't a built-in feature of reminders, but you could use a dashboard to do it -kevin pgpiZpckKoCcR.pgp Description: PGP signature
Re: [rt-users] notification - solved
The custom notification issue that I was trying to solve has been solved. The issue was the ordering of the scripts. I had 'TransactionBatch' set for all of my scripts that run 'On Create' but I was still having an ordering issue. I was trying to get the value of a Custom Field before the value was set. So, I named my scrips starting with numbers (numeric/alphabetic) and that caused the scrips to run in the order that they need to run to populate and get custom field values. The entire process: When a ticket is created, the 'requestor' e-mail address is looked up in LDAP and the 'location' attribute is returned and populates a Custom Field. Then that Custom Field (Location) is tested and married with a technician or group of technicians. The e-mail address of the technician is placed in a separate Custom Field. Then I have a scrip that uses Notify Other Recipients and a custom template that pulls the email address out of the Custom Field and creates a 'To:' address that sends an e-mail to the specified address. Ken and Kevin... thanks for all your help. Kurt Engle Network Engineer 4J Schools From: Kurt Engle en...@4j.lane.edu To: Thomas Sibley t...@bestpractical.com Cc: rt-users@lists.bestpractical.com Sent: Tuesday, December 14, 2010 11:11:31 AM Subject: Re: [rt-users] notification Yes, I understand that it is not. My first example below is returning nothing. On 14 Dec 2010 13:53, Kurt Engle wrote: I have tried FirstCustomFieldValue('NotifyEmail') but it returns nothing. But I can look at the ticket and it shows the value that I would expect there. Kurt Engle Network Engineer Eugene 4J Schools From: Thomas Sibley t...@bestpractical.com To: rt-users@lists.bestpractical.com Sent: Tuesday, December 14, 2010 11:04:10 AM Subject: Re: [rt-users] notification On 14 Dec 2010 13:53, Kurt Engle wrote: I have tried FirstCustomFieldValue('NotifyEmail') but it returns nothing. But I can look at the ticket and it shows the value that I would expect there. FirstCustomFieldValues('NotifyEmail') returns this in the log file: Template parsing error: RT::Ticket::FirstCustomFieldValues Unimplemented in Text::Template::GEN14. It's not plural. Thomas
Re: [rt-users] notification
On Mon, Dec 13, 2010 at 02:24:26PM -0800, Kurt Engle wrote: Action: Notify Other Recipients Oh, I wonder if that is your problem. Notify Other Recipients notifies CCs { my $to_address = rubble; } To: {$to_addre...@4j.lane.edu Subject: New Ticket #{ $Ticket-Id() } has been created What happens if you Cc: to that address, or RT-Send-Cc: to that address? -kevin pgpjVE0tfBJG3.pgp Description: PGP signature
Re: [rt-users] notification
I have tried FirstCustomFieldValue('NotifyEmail') but it returns nothing. But I can look at the ticket and it shows the value that I would expect there. FirstCustomFieldValues('NotifyEmail') returns this in the log file: Template parsing error: RT::Ticket::FirstCustomFieldValues Unimplemented in Text::Template::GEN14. Kurt Engle Network Engineer Eugene 4J Schools From: Kevin Falcone falc...@bestpractical.com To: rt-users@lists.bestpractical.com Sent: Tuesday, December 14, 2010 10:40:33 AM Subject: Re: [rt-users] notification On Tue, Dec 14, 2010 at 09:50:38AM -0800, Kurt Engle wrote: I am trying to approach this a little differently now. I am skipping the email part, and just trying to get it to print the value I want in the email (I am hard coding the To: field) But when I use this in the body of the email: { $Ticket-CustomFieldValues('NotifyEmail');} My result is this: RT::ObjectCustomFieldValues=HASH(0x2b9a63a9c110) But I cannot figure out how to get the value out of the Hash. You're missing the word First in your method call -kevin -- From: Kevin Falcone falc...@bestpractical.com To: rt-users@lists.bestpractical.com Sent: Tuesday, December 14, 2010 8:19:16 AM Subject: Re: [rt-users] notification On Mon, Dec 13, 2010 at 02:24:26PM -0800, Kurt Engle wrote: Action: Notify Other Recipients Oh, I wonder if that is your problem. Notify Other Recipients notifies CCs { my $to_address = rubble; } To: {$to_addre...@4j.lane.edu Subject: New Ticket #{ $Ticket-Id() } has been created What happens if you Cc: to that address, or RT-Send-Cc: to that address? -kevin
Re: [rt-users] notification
On 14 Dec 2010 13:53, Kurt Engle wrote: I have tried FirstCustomFieldValue('NotifyEmail') but it returns nothing. But I can look at the ticket and it shows the value that I would expect there. FirstCustomFieldValues('NotifyEmail') returns this in the log file: Template parsing error: RT::Ticket::FirstCustomFieldValues Unimplemented in Text::Template::GEN14. It's not plural. Thomas
Re: [rt-users] notification
Yes, I understand that it is not. My first example below is returning nothing. On 14 Dec 2010 13:53, Kurt Engle wrote: I have tried FirstCustomFieldValue('NotifyEmail') but it returns nothing. But I can look at the ticket and it shows the value that I would expect there. Kurt Engle Network Engineer Eugene 4J Schools From: Thomas Sibley t...@bestpractical.com To: rt-users@lists.bestpractical.com Sent: Tuesday, December 14, 2010 11:04:10 AM Subject: Re: [rt-users] notification On 14 Dec 2010 13:53, Kurt Engle wrote: I have tried FirstCustomFieldValue('NotifyEmail') but it returns nothing. But I can look at the ticket and it shows the value that I would expect there. FirstCustomFieldValues('NotifyEmail') returns this in the log file: Template parsing error: RT::Ticket::FirstCustomFieldValues Unimplemented in Text::Template::GEN14. It's not plural. Thomas
Re: [rt-users] notification
So here is the code that I am working with inside my template: Script: Condition: On Create Action: Notify Other Recipients Template: My Notify Stage: TransactionBatch 'My Notify' code --- { my $trans = $self-TransactionObj; my $ticket = $self-TicketObj; my $cf = new RT::CustomField($RT::SystemUser); $cf-LoadByName(Queue = $ticket-QueueObj-id,Name = Building); return 0 unless $cf-id; my $cfvalue = $ticket-FirstCustomFieldValue('Building'); my $to_address = ; if ($cfvalue =~ /Sheldon/) { $to_address = sheldonhd; } elsif ($cfvalue =~ /North/) { $to_address = northhd; } elsif ($cfvalue =~ /South/) { $to_address = southhd; } elsif ($cfvalue =~ /Churchill/) { $to_address = churchillhd; } elsif ($cfvalue =~ /Kennedy/) { $to_address = kennedyhd; } elsif ($cfvalue =~ /Kelly/) { $to_address = kellyhd; } elsif ($cfvalue =~ /Computer/) { $to_address = engle; else { $to_address= rubble; } return 1; } To: {$to_addre...@4j.lane.edu} Subject: New Ticket #{ $Ticket-Id() } has been created Time to go to work -- In my debug log, I am not even seeing the script being called that contains this template. If I strip everything above the 'To:' field, the scrip and template gets called but the e-mail is not sent even when I hard code the e-mail address. Kurt Engle From: Kevin Falcone falc...@bestpractical.com To: rt-users@lists.bestpractical.com Sent: Friday, December 10, 2010 12:23:28 PM Subject: Re: [rt-users] notification On Fri, Dec 10, 2010 at 12:08:05PM -0800, Kenneth Crocker wrote: Kevin, The template would look like this: Kenn I'm perfectly able to write the scrip and template in question, but since Kurt has a half-working template I was curious what *he* was doing. Involving a CustomField seems like a bit of overkill. -kevin To: {$Ticket-FirstCustomFieldValue('ToOverride')}...@[1]lbl.gov Subject: Request Titled: {$Ticket-Subject} is ready to Migrate! A scrip based on whatever condition would do this: my $trans = $self-TransactionObj; my $ticket = $self-TicketObj; my $cf_obj = new RT::CustomField($RT::SystemUser); my $cf_name = ToOverride; if condition is A $my $cf_value = the To address you want for A condition; elsif condition is B $my $cf_value = the To address you want for B condition; and on and on till you're thru. then, set the Custom Field as the last piece of action code: $cf_obj-LoadByName(Name=$cf_name); $RT::Logger-debug(Loaded\$cf_obj-Name = . $cf_obj-Name() .\n ); $ticket-AddCustomFieldValue( Field=$cf_obj, Value=$cf_value, RecordTransaction=0 ); return 1; Then write a notification scrip to use the new template based on your conditions. Use TransactioBatch for both scrips. Hope this helps. Kenn LBNL On Fri, Dec 10, 2010 at 11:55 AM, Kevin Falcone [2]falc...@bestpractical.com wrote: On Fri, Dec 10, 2010 at 11:07:32AM -0800, Kurt Engle wrote: Actually found a nice example of creating a template to send out an e-mail. RTFM However, I am having a bit of a problem constructing the To: field. Basically, I have a varialble '$toAddress' that is set to an e-mail address by some prior code. Where in the code is it set. It would really need to be in that template Here is my template code to construct the To: field: To: { $toAddress } Subject: Ticket #{ $Ticket-Id()} {$Ticket-Subject()} A new ticket has been created for you in the HelpDesk Queue. { $RT::WebURL } Ticket/Display.html?id={ $Ticket-Id() } However, I keep getting 'recipient not found'. In debug logging mode, RT will actually dump copies of the email being processed into the logs, which would show you the To: Please note that if To: is your email address and you're the actor on this ticket while testing, you may have told RT not to send you email in that case using $NotifyActor -kevin -- From: Kevin Falcone [3]falc...@bestpractical.com To: [4]rt-us...@lists.bestpractical.com Sent: Friday, December 10, 2010 10:03:04 AM Subject: Re: [rt-users] notification On Fri, Dec 10, 2010 at 09:55:07AM -0800, Kurt Engle wrote: That is correct. But how do I make use of the RT::Action::SendEmail module to send the notification incorporating my To: field. Or is there a better way to send out a custom notification? You use one of the standard Notify actions and a custom template. You don't write any code in the action and you don't call the action directly. -kevin From: Kevin Falcone [5]falc...@bestpractical.com To: [6]rt-us...@lists.bestpractical.com Sent: Friday, December 10, 2010 8:59:25 AM Subject: Re: [rt-users] notification On Thu, Dec 09, 2010 at 11:42:03AM -0800, Kurt Engle wrote: I am
Re: [rt-users] notification
I have removed the blank lines, thank you for that tip. I am sending in the 'ticket' as a user other than myself and I am trying to notify someone other than myself. I am still not seeing the scrip being run. But, if I put the following code in the template: - {my $to_address = username } To: {$to_addre...@4j.lane.edu Subject: New Ticket #{ $Ticket-Id() } has been created Time to go to work -- The script that uses this template gets run but I get an error on the recipients. I am trying to create a simple test that will successfully sendout e-mail, then I can start trying to figure out why my code is broken. Kurt Engle From: Kevin Falcone falc...@bestpractical.com To: Kurt Engle en...@4j.lane.edu Sent: Monday, December 13, 2010 11:34:58 AM Subject: Re: [rt-users] notification On Mon, Dec 13, 2010 at 11:15:33AM -0800, Kurt Engle wrote: So here is the code that I am working with inside my template: } To: {$to_addre...@4j.lane.edu} Subject: New Ticket #{ $Ticket-Id() } has been created Time to go to work -- In my debug log, I am not even seeing the script being called that contains this template. If I strip everything above the 'To:' field, the scrip and template gets called but the e-mail is not sent even when I hard code the e-mail address. You can't have blank lines above To: Headers need to be the first lines in the template (after your code) Having blank lines like that means that the To: is going in the body Also, I believe we asked about NotifyActor. If you're testing as yourself and emailing yourself RT will not notify you based on the setting of that variable -kevin
Re: [rt-users] notification
On Mon, Dec 13, 2010 at 11:50:53AM -0800, Kurt Engle wrote: I have removed the blank lines, thank you for that tip. I am sending in the 'ticket' as a user other than myself and I am trying to notify someone other than myself. I am still not seeing the scrip being run. But, if I put the following code in the template: - {my $to_address = username } To: {$to_addre...@4j.lane.edu Subject: New Ticket #{ $Ticket-Id() } has been created Time to go to work -- The script that uses this template gets run but I get an error on the recipients. I am trying to create a simple test that will successfully sendout e-mail, then I can start trying to figure out why my code is broken. Please include the error pgpvqFqhX0d4X.pgp Description: PGP signature
Re: [rt-users] notification
Kurt, Not sure why you start the scrip with a { and end with one. Just start with the my $trans=. Your code should be in the Prep Action and you should add this at the end of the code you've got: else { $to_address= rubble; ### after the above line, the code should look like this: # copy value of To_Address to Custom Field Whatever you named it my $cf_name = Whatever it is; $cf_obj-LoadByName( Name = $cf_name ); $RT::Logger-debug( Loaded \$cf_obj-Name = . $cf_obj-Name() .\n ); $ticket-AddCustomFieldValue(Field=$cf_obj, Value=$to_address, RecordTransaction=0); return 1; Then make sure the Cleanup Action ends with a return 1; or the scrip doesn't finish. Also, not sure why you start the scrip with a { and end with one. Just start with the my $trans=. The Template should refer to the value in the CF you created for the To Address, like this: To: {$Ticket-FirstCustomFieldValue('To Address Value')}...@4j.lane.edu Subject: Request Titled: {$Ticket-Subject} is ready to Migrate or whatever That should do it. Kenn LBNL On Mon, Dec 13, 2010 at 11:15 AM, Kurt Engle en...@4j.lane.edu wrote: So here is the code that I am working with inside my template: Script: Condition: On Create Action: Notify Other Recipients Template: My Notify Stage: TransactionBatch 'My Notify' code --- { my $trans = $self-TransactionObj; my $ticket = $self-TicketObj; my $cf = new RT::CustomField($RT::SystemUser); $cf-LoadByName(Queue = $ticket-QueueObj-id,Name = Building); return 0 unless $cf-id; my $cfvalue = $ticket-FirstCustomFieldValue('Building'); my $to_address = ; if ($cfvalue =~ /Sheldon/) { $to_address = sheldonhd; } elsif ($cfvalue =~ /North/) { $to_address = northhd; } elsif ($cfvalue =~ /South/) { $to_address = southhd; } elsif ($cfvalue =~ /Churchill/) { $to_address = churchillhd; } elsif ($cfvalue =~ /Kennedy/) { $to_address = kennedyhd; } elsif ($cfvalue =~ /Kelly/) { $to_address = kellyhd; } elsif ($cfvalue =~ /Computer/) { $to_address = engle; else { $to_address= rubble; } return 1; } To: {$to_addre...@4j.lane.edu to_address...@4j.lane.edu} Subject: New Ticket #{ $Ticket-Id() } has been created Time to go to work -- In my debug log, I am not even seeing the script being called that contains this template. If I strip everything above the 'To:' field, the scrip and template gets called but the e-mail is not sent even when I hard code the e-mail address. Kurt Engle -- *From: *Kevin Falcone falc...@bestpractical.com *To: *rt-us...@lists.bestpractical.com *Sent: *Friday, December 10, 2010 12:23:28 PM *Subject: *Re: [rt-users] notification On Fri, Dec 10, 2010 at 12:08:05PM -0800, Kenneth Crocker wrote: Kevin, The template would look like this: Kenn I'm perfectly able to write the scrip and template in question, but since Kurt has a half-working template I was curious what *he* was doing. Involving a CustomField seems like a bit of overkill. -kevin To: {$Ticket-FirstCustomFieldValue('ToOverride')}...@[1]lbl.gov Subject: Request Titled: {$Ticket-Subject} is ready to Migrate! A scrip based on whatever condition would do this: my $trans = $self-TransactionObj; my $ticket = $self-TicketObj; my $cf_obj = new RT::CustomField($RT::SystemUser); my $cf_name = ToOverride; if condition is A $my $cf_value = the To address you want for A condition; elsif condition is B $my $cf_value = the To address you want for B condition; and on and on till you're thru. then, set the Custom Field as the last piece of action code: $cf_obj-LoadByName(Name=$cf_name); $RT::Logger-debug(Loaded\$cf_obj-Name = . $cf_obj-Name() .\n ); $ticket-AddCustomFieldValue( Field=$cf_obj, Value=$cf_value, RecordTransaction=0 ); return 1; Then write a notification scrip to use the new template based on your conditions. Use TransactioBatch for both scrips. Hope this helps. Kenn LBNL On Fri, Dec 10, 2010 at 11:55 AM, Kevin Falcone [2] falc...@bestpractical.com wrote: On Fri, Dec 10, 2010 at 11:07:32AM -0800, Kurt Engle wrote: Actually found a nice example of creating a template to send out an e-mail. RTFM However, I am having a bit of a problem constructing the To: field. Basically, I have a varialble '$toAddress' that is set to an e-mail address by some prior code. Where in the code is it set. It would really need to be in that template Here is my template code to construct the To: field: To: { $toAddress } Subject: Ticket #{ $Ticket-Id()} {$Ticket-Subject()} A new ticket has been created for you in the HelpDesk Queue. { $RT::WebURL } Ticket/Display.html?id={ $Ticket-Id
Re: [rt-users] notification
This code was entered in a template not a script. I was trying Kevin's suggestion with doing it all in one go. I figure that if I can capture the CustomField in the template code and test on that value to return my $to_address, then I am pretty much set to create my outgoing e-mail at the same time. Kurt Engle Network Engineer Eugene 4J Schools From: Kenneth Crocker kfcroc...@lbl.gov To: rt-users@lists.bestpractical.com Sent: Monday, December 13, 2010 12:12:50 PM Subject: Re: [rt-users] notification Kurt, Not sure why you start the scrip with a { and end with one. Just start with the my $trans=. Your code should be in the Prep Action and you should add this at the end of the code you've got: else { $to_address= rubble; ### after the above line, the code should look like this: # copy value of To_Address to Custom Field Whatever you named it my $cf_name = Whatever it is; $cf_obj-LoadByName( Name = $cf_name ); $RT::Logger-debug( Loaded \$cf_obj-Name = . $cf_obj-Name() .\n ); $ticket-AddCustomFieldValue(Field=$cf_obj, Value=$to_address, RecordTransaction=0); return 1; Then make sure the Cleanup Action ends with a return 1; or the scrip doesn't finish. Also, not sure why you start the scrip with a { and end with one. Just start with the my $trans=. The Template should refer to the value in the CF you created for the To Address, like this: To: {$Ticket-FirstCustomFieldValue('To Address Value')}@ 4j.lane.edu Subject: Request Titled: {$Ticket-Subject} is ready to Migrate or whatever That should do it. Kenn LBNL On Mon, Dec 13, 2010 at 11:15 AM, Kurt Engle en...@4j.lane.edu wrote: So here is the code that I am working with inside my template: Script: Condition: On Create Action: Notify Other Recipients Template: My Notify Stage: TransactionBatch 'My Notify' code --- { my $trans = $self-TransactionObj; my $ticket = $self-TicketObj; my $cf = new RT::CustomField($RT::SystemUser); $cf-LoadByName(Queue = $ticket-QueueObj-id,Name = Building); return 0 unless $cf-id; my $cfvalue = $ticket-FirstCustomFieldValue('Building'); my $to_address = ; if ($cfvalue =~ /Sheldon/) { $to_address = sheldonhd; } elsif ($cfvalue =~ /North/) { $to_address = northhd; } elsif ($cfvalue =~ /South/) { $to_address = southhd; } elsif ($cfvalue =~ /Churchill/) { $to_address = churchillhd; } elsif ($cfvalue =~ /Kennedy/) { $to_address = kennedyhd; } elsif ($cfvalue =~ /Kelly/) { $to_address = kellyhd; } elsif ($cfvalue =~ /Computer/) { $to_address = engle; else { $to_address= rubble; } return 1; } To: {$ to_addre...@4j.lane.edu } Subject: New Ticket #{ $Ticket-Id() } has been created Time to go to work -- In my debug log, I am not even seeing the script being called that contains this template. If I strip everything above the 'To:' field, the scrip and template gets called but the e-mail is not sent even when I hard code the e-mail address. Kurt Engle From: Kevin Falcone falc...@bestpractical.com To: rt-users@lists.bestpractical.com Sent: Friday, December 10, 2010 12:23:28 PM Subject: Re: [rt-users] notification On Fri, Dec 10, 2010 at 12:08:05PM -0800, Kenneth Crocker wrote: Kevin, The template would look like this: Kenn I'm perfectly able to write the scrip and template in question, but since Kurt has a half-working template I was curious what *he* was doing. Involving a CustomField seems like a bit of overkill. -kevin To: {$Ticket-FirstCustomFieldValue('ToOverride')}...@[1] lbl.gov Subject: Request Titled: {$Ticket-Subject} is ready to Migrate! A scrip based on whatever condition would do this: my $trans = $self-TransactionObj; my $ticket = $self-TicketObj; my $cf_obj = new RT::CustomField($RT::SystemUser); my $cf_name = ToOverride; if condition is A $my $cf_value = the To address you want for A condition; elsif condition is B $my $cf_value = the To address you want for B condition; and on and on till you're thru. then, set the Custom Field as the last piece of action code: $cf_obj-LoadByName(Name=$cf_name); $RT::Logger-debug(Loaded\$cf_obj-Name = . $cf_obj-Name() .\n ); $ticket-AddCustomFieldValue( Field=$cf_obj, Value=$cf_value, RecordTransaction=0 ); return 1; Then write a notification scrip to use the new template based on your conditions. Use TransactioBatch for both scrips. Hope this helps. Kenn LBNL On Fri, Dec 10, 2010 at 11:55 AM, Kevin Falcone [2] falc...@bestpractical.com wrote: On Fri, Dec 10, 2010 at 11:07:32AM -0800, Kurt Engle wrote: Actually found a nice example of creating a template to send out an e-mail. RTFM However, I am having a bit of a problem constructing the To: field. Basically, I have a varialble '$toAddress' that is set to an e-mail address by some prior code. Where in the code is it set
Re: [rt-users] notification
The error that I am getting is: [Mon Dec 13 22:05:45 2010] [info]: rt-3.8.8-18199-1292277945-1004.587-2...@4j.lane.edu #587/7702 - Scrip 26 Email TSS from Template (/opt/rt3/bin/../lib/RT/Action/SendEmail.pm:300) [Mon Dec 13 22:05:45 2010] [info]: rt-3.8.8-18199-1292277945-1004.587-2...@4j.lane.edu No recipients found. Not sending. (/opt/rt3/bin/../lib/RT/Interface/Email.pm:352) Here are the details for scrip #26: Condition: On Create Action: Notify Other Recipients Template: My Notify Stage: TransactionBatch The code that generated this error in my template is: { my $to_address = rubble; } To: {$to_addre...@4j.lane.edu Subject: New Ticket #{ $Ticket-Id() } has been created Time to go to work I really appreciate your help with this. Once I get this solved, RT will provide some much needed customization for our environment. Thanks, Kurt Engle From: Kevin Falcone falc...@bestpractical.com To: rt-users@lists.bestpractical.com Sent: Monday, December 13, 2010 12:11:12 PM Subject: Re: [rt-users] notification On Mon, Dec 13, 2010 at 11:50:53AM -0800, Kurt Engle wrote: I have removed the blank lines, thank you for that tip. I am sending in the 'ticket' as a user other than myself and I am trying to notify someone other than myself. I am still not seeing the scrip being run. But, if I put the following code in the template: - {my $to_address = username } To: {$to_addre...@4j.lane.edu Subject: New Ticket #{ $Ticket-Id() } has been created Time to go to work -- The script that uses this template gets run but I get an error on the recipients. I am trying to create a simple test that will successfully sendout e-mail, then I can start trying to figure out why my code is broken. Please include the error
Re: [rt-users] notification
On Thu, Dec 09, 2010 at 11:42:03AM -0800, Kurt Engle wrote: I am looking for a way to send an email from RT to a specified e-mail address that is not an account in RT or associated with the ticket as a requestor, watcher, CC:, BCC:...etc I have the logic down to specify the e-mail address and have some nasty perl code to actually send the e-mail. But, it seems that RT has some internal module(s) that handle what the nasty perl code is doing. I can see the RT::Action:SendEmail module, but how do I incorporate that into a script that allows me to do what I am looking to do? Sounds like you actually just want to use a normal Notify action, but have the template contain your ugly logic that sets up the To: line based on your perl code -kevin pgp1cBfIgCJh3.pgp Description: PGP signature
Re: [rt-users] notification
That is correct. But how do I make use of the RT::Action::SendEmail module to send the notification incorporating my To: field. Or is there a better way to send out a custom notification? Thanks for the help, Kurt Engle From: Kevin Falcone falc...@bestpractical.com To: rt-users@lists.bestpractical.com Sent: Friday, December 10, 2010 8:59:25 AM Subject: Re: [rt-users] notification On Thu, Dec 09, 2010 at 11:42:03AM -0800, Kurt Engle wrote: I am looking for a way to send an email from RT to a specified e-mail address that is not an account in RT or associated with the ticket as a requestor, watcher, CC:, BCC:...etc I have the logic down to specify the e-mail address and have some nasty perl code to actually send the e-mail. But, it seems that RT has some internal module(s) that handle what the nasty perl code is doing. I can see the RT::Action:SendEmail module, but how do I incorporate that into a script that allows me to do what I am looking to do? Sounds like you actually just want to use a normal Notify action, but have the template contain your ugly logic that sets up the To: line based on your perl code -kevin
Re: [rt-users] notification
On Fri, Dec 10, 2010 at 09:55:07AM -0800, Kurt Engle wrote: That is correct. But how do I make use of the RT::Action::SendEmail module to send the notification incorporating my To: field. Or is there a better way to send out a custom notification? You use one of the standard Notify actions and a custom template. You don't write any code in the action and you don't call the action directly. -kevin From: Kevin Falcone falc...@bestpractical.com To: rt-users@lists.bestpractical.com Sent: Friday, December 10, 2010 8:59:25 AM Subject: Re: [rt-users] notification On Thu, Dec 09, 2010 at 11:42:03AM -0800, Kurt Engle wrote: I am looking for a way to send an email from RT to a specified e-mail address that is not an account in RT or associated with the ticket as a requestor, watcher, CC:, BCC:...etc I have the logic down to specify the e-mail address and have some nasty perl code to actually send the e-mail. But, it seems that RT has some internal module(s) that handle what the nasty perl code is doing. I can see the RT::Action:SendEmail module, but how do I incorporate that into a script that allows me to do what I am looking to do? Sounds like you actually just want to use a normal Notify action, but have the template contain your ugly logic that sets up the To: line based on your perl code -kevin pgpjVl27jT3Fv.pgp Description: PGP signature
Re: [rt-users] notification
Actually found a nice example of creating a template to send out an e-mail. RTFM However, I am having a bit of a problem constructing the To: field. Basically, I have a varialble '$toAddress' that is set to an e-mail address by some prior code. Here is my template code to construct the To: field: To: { $toAddress } Subject: Ticket #{ $Ticket-Id()} {$Ticket-Subject()} A new ticket has been created for you in the HelpDesk Queue. { $RT::WebURL } Ticket/Display.html?id={ $Ticket-Id() } However, I keep getting 'recipient not found'. Kurt Engle From: Kevin Falcone falc...@bestpractical.com To: rt-users@lists.bestpractical.com Sent: Friday, December 10, 2010 10:03:04 AM Subject: Re: [rt-users] notification On Fri, Dec 10, 2010 at 09:55:07AM -0800, Kurt Engle wrote: That is correct. But how do I make use of the RT::Action::SendEmail module to send the notification incorporating my To: field. Or is there a better way to send out a custom notification? You use one of the standard Notify actions and a custom template. You don't write any code in the action and you don't call the action directly. -kevin From: Kevin Falcone falc...@bestpractical.com To: rt-users@lists.bestpractical.com Sent: Friday, December 10, 2010 8:59:25 AM Subject: Re: [rt-users] notification On Thu, Dec 09, 2010 at 11:42:03AM -0800, Kurt Engle wrote: I am looking for a way to send an email from RT to a specified e-mail address that is not an account in RT or associated with the ticket as a requestor, watcher, CC:, BCC:...etc I have the logic down to specify the e-mail address and have some nasty perl code to actually send the e-mail. But, it seems that RT has some internal module(s) that handle what the nasty perl code is doing. I can see the RT::Action:SendEmail module, but how do I incorporate that into a script that allows me to do what I am looking to do? Sounds like you actually just want to use a normal Notify action, but have the template contain your ugly logic that sets up the To: line based on your perl code -kevin
Re: [rt-users] notification
Kurt, Here's a suggestion: 1) Create a CustomField that will hold the To: Address you create from your scrip. 2) Make the privileges for that CF so no one can see it or modify it (RT will be able to in the scrip). This way the CF does clutter up ticket display. 3) Build a template to pull the value of that customField into the To: address. 4) Create a notification scrip to use that template, action Notify Others based on your required condition. That should work. Kenn LBNL On Fri, Dec 10, 2010 at 11:07 AM, Kurt Engle en...@4j.lane.edu wrote: Actually found a nice example of creating a template to send out an e-mail. RTFM However, I am having a bit of a problem constructing the To: field. Basically, I have a varialble '$toAddress' that is set to an e-mail address by some prior code. Here is my template code to construct the To: field: To: { $toAddress } Subject: Ticket #{ $Ticket-Id()} {$Ticket-Subject()} A new ticket has been created for you in the HelpDesk Queue. { $RT::WebURL } Ticket/Display.html?id={ $Ticket-Id() } However, I keep getting 'recipient not found'. Kurt Engle -- *From: *Kevin Falcone falc...@bestpractical.com *To: *rt-us...@lists.bestpractical.com *Sent: *Friday, December 10, 2010 10:03:04 AM *Subject: *Re: [rt-users] notification On Fri, Dec 10, 2010 at 09:55:07AM -0800, Kurt Engle wrote: That is correct. But how do I make use of the RT::Action::SendEmail module to send the notification incorporating my To: field. Or is there a better way to send out a custom notification? You use one of the standard Notify actions and a custom template. You don't write any code in the action and you don't call the action directly. -kevin From: Kevin Falcone falc...@bestpractical.com To: rt-users@lists.bestpractical.com Sent: Friday, December 10, 2010 8:59:25 AM Subject: Re: [rt-users] notification On Thu, Dec 09, 2010 at 11:42:03AM -0800, Kurt Engle wrote: I am looking for a way to send an email from RT to a specified e-mail address that is not an account in RT or associated with the ticket as a requestor, watcher, CC:, BCC:...etc I have the logic down to specify the e-mail address and have some nasty perl code to actually send the e-mail. But, it seems that RT has some internal module(s) that handle what the nasty perl code is doing. I can see the RT::Action:SendEmail module, but how do I incorporate that into a script that allows me to do what I am looking to do? Sounds like you actually just want to use a normal Notify action, but have the template contain your ugly logic that sets up the To: line based on your perl code -kevin
Re: [rt-users] notification
On Fri, Dec 10, 2010 at 11:07:32AM -0800, Kurt Engle wrote: Actually found a nice example of creating a template to send out an e-mail. RTFM However, I am having a bit of a problem constructing the To: field. Basically, I have a varialble '$toAddress' that is set to an e-mail address by some prior code. Where in the code is it set. It would really need to be in that template Here is my template code to construct the To: field: To: { $toAddress } Subject: Ticket #{ $Ticket-Id()} {$Ticket-Subject()} A new ticket has been created for you in the HelpDesk Queue. { $RT::WebURL } Ticket/Display.html?id={ $Ticket-Id() } However, I keep getting 'recipient not found'. In debug logging mode, RT will actually dump copies of the email being processed into the logs, which would show you the To: Please note that if To: is your email address and you're the actor on this ticket while testing, you may have told RT not to send you email in that case using $NotifyActor -kevin -- From: Kevin Falcone falc...@bestpractical.com To: rt-users@lists.bestpractical.com Sent: Friday, December 10, 2010 10:03:04 AM Subject: Re: [rt-users] notification On Fri, Dec 10, 2010 at 09:55:07AM -0800, Kurt Engle wrote: That is correct. But how do I make use of the RT::Action::SendEmail module to send the notification incorporating my To: field. Or is there a better way to send out a custom notification? You use one of the standard Notify actions and a custom template. You don't write any code in the action and you don't call the action directly. -kevin From: Kevin Falcone falc...@bestpractical.com To: rt-users@lists.bestpractical.com Sent: Friday, December 10, 2010 8:59:25 AM Subject: Re: [rt-users] notification On Thu, Dec 09, 2010 at 11:42:03AM -0800, Kurt Engle wrote: I am looking for a way to send an email from RT to a specified e-mail address that is not an account in RT or associated with the ticket as a requestor, watcher, CC:, BCC:...etc I have the logic down to specify the e-mail address and have some nasty perl code to actually send the e-mail. But, it seems that RT has some internal module(s) that handle what the nasty perl code is doing. I can see the RT::Action:SendEmail module, but how do I incorporate that into a script that allows me to do what I am looking to do? Sounds like you actually just want to use a normal Notify action, but have the template contain your ugly logic that sets up the To: line based on your perl code -kevin pgpFVfEubFWey.pgp Description: PGP signature
Re: [rt-users] notification
Kevin, The template would look like this: To: {$Ticket-FirstCustomFieldValue('ToOverride')}...@lbl.gov Subject: Request Titled: {$Ticket-Subject} is ready to Migrate! A scrip based on whatever condition would do this: my $trans = $self-TransactionObj; my $ticket = $self-TicketObj; my $cf_obj = new RT::CustomField($RT::SystemUser); my $cf_name = ToOverride; if condition is A $my $cf_value = the To address you want for A condition; elsif condition is B $my $cf_value = the To address you want for B condition; and on and on till you're thru. then, set the Custom Field as the last piece of action code: $cf_obj-LoadByName(Name=$cf_name); $RT::Logger-debug(Loaded\$cf_obj-Name = . $cf_obj-Name() .\n ); $ticket-AddCustomFieldValue( Field=$cf_obj, Value=$cf_value, RecordTransaction=0 ); return 1; Then write a notification scrip to use the new template based on your conditions. Use TransactioBatch for both scrips. Hope this helps. Kenn LBNL On Fri, Dec 10, 2010 at 11:55 AM, Kevin Falcone falc...@bestpractical.comwrote: On Fri, Dec 10, 2010 at 11:07:32AM -0800, Kurt Engle wrote: Actually found a nice example of creating a template to send out an e-mail. RTFM However, I am having a bit of a problem constructing the To: field. Basically, I have a varialble '$toAddress' that is set to an e-mail address by some prior code. Where in the code is it set. It would really need to be in that template Here is my template code to construct the To: field: To: { $toAddress } Subject: Ticket #{ $Ticket-Id()} {$Ticket-Subject()} A new ticket has been created for you in the HelpDesk Queue. { $RT::WebURL } Ticket/Display.html?id={ $Ticket-Id() } However, I keep getting 'recipient not found'. In debug logging mode, RT will actually dump copies of the email being processed into the logs, which would show you the To: Please note that if To: is your email address and you're the actor on this ticket while testing, you may have told RT not to send you email in that case using $NotifyActor -kevin -- From: Kevin Falcone falc...@bestpractical.com To: rt-users@lists.bestpractical.com Sent: Friday, December 10, 2010 10:03:04 AM Subject: Re: [rt-users] notification On Fri, Dec 10, 2010 at 09:55:07AM -0800, Kurt Engle wrote: That is correct. But how do I make use of the RT::Action::SendEmail module to send the notification incorporating my To: field. Or is there a better way to send out a custom notification? You use one of the standard Notify actions and a custom template. You don't write any code in the action and you don't call the action directly. -kevin From: Kevin Falcone falc...@bestpractical.com To: rt-users@lists.bestpractical.com Sent: Friday, December 10, 2010 8:59:25 AM Subject: Re: [rt-users] notification On Thu, Dec 09, 2010 at 11:42:03AM -0800, Kurt Engle wrote: I am looking for a way to send an email from RT to a specified e-mail address that is not an account in RT or associated with the ticket as a requestor, watcher, CC:, BCC:...etc I have the logic down to specify the e-mail address and have some nasty perl code to actually send the e-mail. But, it seems that RT has some internal module(s) that handle what the nasty perl code is doing. I can see the RT::Action:SendEmail module, but how do I incorporate that into a script that allows me to do what I am looking to do? Sounds like you actually just want to use a normal Notify action, but have the template contain your ugly logic that sets up the To: line based on your perl code -kevin
[rt-users] notification
I am looking for a way to send an email from RT to a specified e-mail address that is not an account in RT or associated with the ticket as a requestor, watcher, CC:, BCC:...etc I have the logic down to specify the e-mail address and have some nasty perl code to actually send the e-mail. But, it seems that RT has some internal module(s) that handle what the nasty perl code is doing. I can see the RT::Action:SendEmail module, but how do I incorporate that into a script that allows me to do what I am looking to do? Thanks, Kurt Engle
Re: [rt-users] Notification to new owner when case take
thanks, I have enabled this setting but since it is global this is causing some problems... When a client replies back to an email that was send out to them, they get another email back with their message that was typed, so the same for the RT users. Is there any way to stop this, would have been so much easier if the notifyactor was in the action list for scripts :) Thanks Johann -- View this message in context: http://www.nabble.com/Notification-to-new-owner-when-case-%22take%22-tp20630794p20820548.html Sent from the Request Tracker - User mailing list archive at Nabble.com. ___ 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
Re: [rt-users] Notification to new owner when case take
Hi Ruslan. Thank you for the information, but i cannot seem to find the NotifyActor, is this is a custom action? Thanks Johann Ruslan Zakirov-2 wrote: NotifyActor On Sat, Nov 22, 2008 at 1:46 AM, JohannS [EMAIL PROTECTED] wrote: Hi. We have RT 3.8.6 currently installed. I am trying to setup a script that will notify the owner who just click the button take, to assign the case to themselves. The normal script of condition on create or on owner change does not send an email to the new owner. However if you change the owner through the basics window the script is fired, but Take has some other kind of condition or flags. ANy help would be appreciated. Thanks Johann View this message in context: Notification to new owner when case take Sent from the Request Tracker - User mailing list archive at Nabble.com. ___ 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 -- Best regards, Ruslan. ___ 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 -- View this message in context: http://www.nabble.com/Notification-to-new-owner-when-case-%22take%22-tp20630794p20800030.html Sent from the Request Tracker - User mailing list archive at Nabble.com. ___ 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
Re: [rt-users] Notification to new owner when case take
On Tue, Dec 02, 2008 at 12:17:54PM -0800, JohannS wrote: Hi Ruslan. Thank you for the information, but i cannot seem to find the NotifyActor, is this is a custom action? It's an option in RT config file (RT_Config.pm), the comment assiociated explain it's meaning :) ___ 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
Re: [rt-users] Notification to new owner when case take
NotifyActor On Sat, Nov 22, 2008 at 1:46 AM, JohannS [EMAIL PROTECTED] wrote: Hi. We have RT 3.8.6 currently installed. I am trying to setup a script that will notify the owner who just click the button take, to assign the case to themselves. The normal script of condition on create or on owner change does not send an email to the new owner. However if you change the owner through the basics window the script is fired, but Take has some other kind of condition or flags. ANy help would be appreciated. Thanks Johann View this message in context: Notification to new owner when case take Sent from the Request Tracker - User mailing list archive at Nabble.com. ___ 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 -- Best regards, Ruslan. ___ 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
[rt-users] Notification to new owner when case take
Hi. We have RT 3.8.6 currently installed. I am trying to setup a script that will notify the owner who just click the button take, to assign the case to themselves. The normal script of condition on create or on owner change does not send an email to the new owner. However if you change the owner through the basics window the script is fired, but Take has some other kind of condition or flags. ANy help would be appreciated. Thanks Johann -- View this message in context: http://www.nabble.com/Notification-to-new-owner-when-case-%22take%22-tp20630794p20630794.html Sent from the Request Tracker - User mailing list archive at Nabble.com. ___ 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
Re: [rt-users] Notification problem
On Jun 27, 2007, at 11:49 PM, Kenneth Crocker wrote: To all, I was under the assumption that any global scrip applied to all queues, but that if one created a queue only scrip with the same name, the global scrip would be ignored. Templates yes, Scrips, no. -j PGP.sig Description: This is a digitally signed message part ___ 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
Re: [rt-users] Notification problem
Hi Kenn-- we have a similar situation. I'm getting around it by using the following as a custom condition on the global scrip (I have no idea if your idea re: local scrips of same name super-ceding global scrips). Obviously this particular bit of code is for transactions where tickets are being resolved-- depending on the global scrip you may want to tweak that as well. # test if the ticket is being resolved and in the /queuename/(queue name must be case sensitive) # if it is, don't run the scrip, if it isn't, run it if (($self-TransactionObj-NewValue eq resolved) ($self-TransactionObj-Type eq Status) ($self-TicketObj-QueueObj-Name ne /queuename/)) { return 1; } else { return undef; } Forrest Kenneth Crocker wrote: To all, I was under the assumption that any global scrip applied to all queues, but that if one created a queue only scrip with the same name, the global scrip would be ignored. I have a global scrip that states: name: Notify other recipients on correspond condition: on correspond action: notify other recipients template: global template: correspondence stage: TransactionCreate I have duplicated this scrip by name for queue GL: name: Notify other recipients on correspond condition: on correspond action: notify other recipients as comment template: global template: correspondence stage: TransactionCreate The difference is the as comment part. I thought the as comment meant that an E_mail will NOT go out (otherwise, why have that difference?). I made this second scrip because out of 50+ queues, the owner of the GL queue does not want this type of notification. So, I thought by creating the second scrip, it would resolve the problem. IT doesn't work. The AdminCc and the CC watchers still get E_mail on correspondence. Anyone have a clue as to why? Thanks. Kenn LBNL ___ 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 ___ 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
Re: [rt-users] Notification problem
At Wednesday 6/27/2007 05:49 PM, Kenneth Crocker wrote: To all, I was under the assumption that any global scrip applied to all queues, but that if one created a queue only scrip with the same name, the global scrip would be ignored. I have a global scrip that states: name: Notify other recipients on correspond condition: on correspond action: notify other recipients template: global template: correspondence stage: TransactionCreate I have duplicated this scrip by name for queue GL: name: Notify other recipients on correspond condition: on correspond action: notify other recipients as comment template: global template: correspondence stage: TransactionCreate The difference is the as comment part. I thought the as comment meant that an E_mail will NOT go out (otherwise, why have that difference?). I made this second scrip because out of 50+ queues, the owner of the GL queue does not want this type of notification. So, I thought by creating the second scrip, it would resolve the problem. IT doesn't work. The AdminCc and the CC watchers still get E_mail on correspondence. Anyone have a clue as to why? Thanks. Kenn LBNL Hello Kenn, Neither of these scrips should notify watchers - 'other recipients' are one-time recipients that you'd type on the reply screen. So I'd say the notifications you see are coming from another scrip. Also - as comment means that the mail will be sent with the queue's comment address as the return address. So if someone replies, their reply will come back to the ticket as a comment. Steve ___ 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