Re: [rt-users] Notify based on CF
Do you want a partial solution, to get started? I installed RT::Extension::ExtractCustomFieldValues and I think your first step would be to add a Scrip for On Create with action Extract Custom Field Values but exactly what you'd need to do then eludes me. Something like Create a template where the To: line is based on the value in the Custom Field But I'm still pretty new at all this RT stuff. Josh Narins Director of Application Development SeniorBridge 845 Third Ave 7th Floor New York, NY 10022 Tel: (212) 994-6194 Fax: (212) 994-4260 Mobile: (917) 488-6248 jnar...@seniorbridge.com seniorbridge.comhttp://www.seniorbridge.com/ [http://www.seniorbridge.com/images/seniorbridgedisclaimerTAG.gif] SeniorBridge Statement of Confidentiality: The contents of this email message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. Any dissemination, distribution or copying of this email by an unintended or mistaken recipient is strictly prohibited. In said event, kindly reply to the sender and destroy all entries of this message and any attachments from your system. Thank you. From: rt-users-boun...@lists.bestpractical.com [mailto:rt-users-boun...@lists.bestpractical.com] On Behalf Of Kurt Engle Sent: Wednesday, December 01, 2010 7:05 PM To: rt-users Subject: [rt-users] Notify based on CF I am interested in setting up a notification tree based on a Custom Field value. Basically, I have one Q that accepts tickets from multiple physical locations. I have a tech at each location. I would like the tech at location X to be notified when a ticket comes in with the Custom Field Location=X . When the CF Location=Y, I want a different tech notified, etc... Thanks for any help.. Kurt Engle
Re: [rt-users] Notify based on CF
On Wed, Dec 01, 2010 at 04:04:59PM -0800, Kurt Engle wrote: I am interested in setting up a notification tree based on a Custom Field value. Basically, I have one Q that accepts tickets from multiple physical locations. I have a tech at each location. I would like the tech at location X to be notified when a ticket comes in with the Custom Field Location=X . When the CF Location=Y, I want a different tech notified, etc... I'd have a Scrip that set the Owner based on that CF and then have a scrip that notifies Owners on owner change. -kevin pgp2j0uDuyuN9.pgp Description: PGP signature
Re: [rt-users] Notify based on CF
That is exactly what I would like to have happen, but I am having a bit of a challenge finding the correct code snipits to accomplish this. I believe that I am pretty much looking at a big if/then statement. I am pretty much a novice at Perl but can figure things out if pushed in the right direction. If I have a custom field called 'Location' and a user called 'Bob' with an e-mail of 'b...@bob.com', what is the beginning of a scrip that would test the Location and notify Bob if the Location matches, say, Oregon? Do I need two scrips here? One to do the matching and set the owner, and another to do the notification? Thanks for the help, Kurt Engle From: Kevin Falcone falc...@bestpractical.com To: rt-users@lists.bestpractical.com Sent: Thursday, December 2, 2010 7:03:03 AM Subject: Re: [rt-users] Notify based on CF On Wed, Dec 01, 2010 at 04:04:59PM -0800, Kurt Engle wrote: I am interested in setting up a notification tree based on a Custom Field value. Basically, I have one Q that accepts tickets from multiple physical locations. I have a tech at each location. I would like the tech at location X to be notified when a ticket comes in with the Custom Field Location=X . When the CF Location=Y, I want a different tech notified, etc... I'd have a Scrip that set the Owner based on that CF and then have a scrip that notifies Owners on owner change. -kevin
Re: [rt-users] Notify based on CF
I have RT::Extension::ExtractCustomFieldValues installed and working. I do not have a problem populating the CF of a ticket. What I do need is a way to test that value and then notify an e-mail address based on the CF value. Basically, I need some help with Perl to accomplish this... Kurt Engle From: Josh Narins jnar...@seniorbridge.com To: Kurt Engle en...@4j.lane.edu, rt-users rt-users@lists.bestpractical.com Sent: Thursday, December 2, 2010 6:26:56 AM Subject: RE: [rt-users] Notify based on CF Do you want a partial solution, to get started? I installed RT::Extension::ExtractCustomFieldValues and I think your first step would be to add a Scrip for On Create with action Extract Custom Field Values but exactly what you'd need to do then eludes me. Something like Create a template where the To: line is based on the value in the Custom Field But I'm still pretty new at all this RT stuff. Josh Narins Director of Application Development SeniorBridge 845 Third Ave 7th Floor New York, NY 10022 Tel: (212) 994-6194 Fax: (212) 994-4260 Mobile: (917) 488-6248 jnar...@seniorbridge.com seniorbridge.com SeniorBridge SeniorBridge Statement of Confidentiality: The contents of this email message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. Any dissemination, distribution or copying of this email by an unintended or mistaken recipient is strictly prohibited. In said event, kindly reply to the sender and destroy all entries of this message and any attachments from your system. Thank you. From: rt-users-boun...@lists.bestpractical.com [mailto:rt-users-boun...@lists.bestpractical.com] On Behalf Of Kurt Engle Sent: Wednesday, December 01, 2010 7:05 PM To: rt-users Subject: [rt-users] Notify based on CF I am interested in setting up a notification tree based on a Custom Field value. Basically, I have one Q that accepts tickets from multiple physical locations. I have a tech at each location. I would like the tech at location X to be notified when a ticket comes in with the Custom Field Location=X . When the CF Location=Y, I want a different tech notified, etc... Thanks for any help.. Kurt Engle
Re: [rt-users] Notify based on CF
Kurt, I agree with Kevin. The following is a simple scrip that sets the Owner based on the value in a Custom Field array: Name: Set owner on CF Condition:On Create Action:User-defined Template: Blank Stage: TransactionCreate or TransactionBatch Custom Action Prep: # --- # # Set ticket owner based on Custom Field # KFCrocker 6/01/09 # --- # # set new ticket owner id value my $trans = $self-TransactionObj; my $ticket = $self-TicketObj; my $ownerid = 10; # Nobody my %orgs = qw( value1999 value2999 value3999 ); my $cf = new RT::CustomField($RT::SystemUser); $cf-LoadByName(Queue = $ticket-QueueObj-id,Name = CF Name); return 0 unless $cf-id; my $cfvalue = $ticket-FirstCustomFieldValue('CFO-Org'); my $ownerid = $orgs{$cfvalue}; # set new Ticket Owner ID $ticket-SetOwner($ownerid); return 1; Custom Action Cleanup: return 1; Then follow up by creating a separate notification on Owner change. Hope this helps. Kenn LBNL On Thu, Dec 2, 2010 at 8:00 AM, Kurt Engle en...@4j.lane.edu wrote: I have RT::Extension::ExtractCustomFieldValues installed and working. I do not have a problem populating the CF of a ticket. What I do need is a way to test that value and then notify an e-mail address based on the CF value. Basically, I need some help with Perl to accomplish this... Kurt Engle -- *From: *Josh Narins jnar...@seniorbridge.com *To: *Kurt Engle en...@4j.lane.edu, rt-users rt-users@lists.bestpractical.com *Sent: *Thursday, December 2, 2010 6:26:56 AM *Subject: *RE: [rt-users] Notify based on CF Do you want a partial solution, to get started? I installed RT::Extension::ExtractCustomFieldValues and I think your first step would be to add a Scrip for On Create with action Extract Custom Field Values but exactly what you'd need to do then eludes me. Something like Create a template where the To: line is based on the value in the Custom Field But I'm still pretty new at all this RT stuff. *Josh Narins* Director of Application Development SeniorBridge 845 Third Ave 7th Floor New York, NY 10022 Tel: (212) 994-6194 Fax: (212) 994-4260 Mobile: (917) 488-6248 jnar...@seniorbridge.com seniorbridge.com http://www.seniorbridge.com/ [image: SeniorBridge] -- *SeniorBridge Statement of Confidentiality:* The contents of this email message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. Any dissemination, distribution or copying of this email by an unintended or mistaken recipient is strictly prohibited. In said event, kindly reply to the sender and destroy all entries of this message and any attachments from your system. Thank you. *From:* rt-users-boun...@lists.bestpractical.com [mailto: rt-users-boun...@lists.bestpractical.com] *On Behalf Of *Kurt Engle *Sent:* Wednesday, December 01, 2010 7:05 PM *To:* rt-users *Subject:* [rt-users] Notify based on CF I am interested in setting up a notification tree based on a Custom Field value. Basically, I have one Q that accepts tickets from multiple physical locations. I have a tech at each location. I would like the tech at location X to be notified when a ticket comes in with the Custom Field Location=X . When the CF Location=Y, I want a different tech notified, etc... Thanks for any help.. Kurt Engle
Re: [rt-users] Notify based on CF
Kurt, Sorry, I forgot to change this line: my $cfvalue = $ticket-FirstCustomFieldValue('CF Name'); Kenn LBNL On Thu, Dec 2, 2010 at 9:25 AM, Kenneth Crocker kfcroc...@lbl.gov wrote: Kurt, I agree with Kevin. The following is a simple scrip that sets the Owner based on the value in a Custom Field array: Name: Set owner on CF Condition:On Create Action:User-defined Template: Blank Stage: TransactionCreate or TransactionBatch Custom Action Prep: # --- # # Set ticket owner based on Custom Field # KFCrocker 6/01/09 # --- # # set new ticket owner id value my $trans = $self-TransactionObj; my $ticket = $self-TicketObj; my $ownerid = 10; # Nobody my %orgs = qw( value1999 value2999 value3999 ); my $cf = new RT::CustomField($RT::SystemUser); $cf-LoadByName(Queue = $ticket-QueueObj-id,Name = CF Name); return 0 unless $cf-id; my $cfvalue = $ticket-FirstCustomFieldValue('CFO-Org'); my $ownerid = $orgs{$cfvalue}; # set new Ticket Owner ID $ticket-SetOwner($ownerid); return 1; Custom Action Cleanup: return 1; Then follow up by creating a separate notification on Owner change. Hope this helps. Kenn LBNL On Thu, Dec 2, 2010 at 8:00 AM, Kurt Engle en...@4j.lane.edu wrote: I have RT::Extension::ExtractCustomFieldValues installed and working. I do not have a problem populating the CF of a ticket. What I do need is a way to test that value and then notify an e-mail address based on the CF value. Basically, I need some help with Perl to accomplish this... Kurt Engle -- *From: *Josh Narins jnar...@seniorbridge.com *To: *Kurt Engle en...@4j.lane.edu, rt-users rt-users@lists.bestpractical.com *Sent: *Thursday, December 2, 2010 6:26:56 AM *Subject: *RE: [rt-users] Notify based on CF Do you want a partial solution, to get started? I installed RT::Extension::ExtractCustomFieldValues and I think your first step would be to add a Scrip for On Create with action Extract Custom Field Values but exactly what you'd need to do then eludes me. Something like Create a template where the To: line is based on the value in the Custom Field But I'm still pretty new at all this RT stuff. *Josh Narins* Director of Application Development SeniorBridge 845 Third Ave 7th Floor New York, NY 10022 Tel: (212) 994-6194 Fax: (212) 994-4260 Mobile: (917) 488-6248 jnar...@seniorbridge.com seniorbridge.com http://www.seniorbridge.com/ [image: SeniorBridge] -- *SeniorBridge Statement of Confidentiality:* The contents of this email message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. Any dissemination, distribution or copying of this email by an unintended or mistaken recipient is strictly prohibited. In said event, kindly reply to the sender and destroy all entries of this message and any attachments from your system. Thank you. *From:* rt-users-boun...@lists.bestpractical.com [mailto: rt-users-boun...@lists.bestpractical.com] *On Behalf Of *Kurt Engle *Sent:* Wednesday, December 01, 2010 7:05 PM *To:* rt-users *Subject:* [rt-users] Notify based on CF I am interested in setting up a notification tree based on a Custom Field value. Basically, I have one Q that accepts tickets from multiple physical locations. I have a tech at each location. I would like the tech at location X to be notified when a ticket comes in with the Custom Field Location=X . When the CF Location=Y, I want a different tech notified, etc... Thanks for any help.. Kurt Engle
Re: [rt-users] Notify based on CF
Ken, thanks for the code. I will give it a go and see what happens. One question. I am not wanting to set the owner of the ticket, but simply send out a notification to a specific person based on the CF value. The owner of the ticket will be set in the usual manner of 'take'ing the ticket. Does that change this process? Kurt Engle From: Kenneth Crocker kfcroc...@lbl.gov To: rt-users@lists.bestpractical.com Sent: Thursday, December 2, 2010 9:25:25 AM Subject: Re: [rt-users] Notify based on CF Kurt, I agree with Kevin. The following is a simple scrip that sets the Owner based on the value in a Custom Field array: Name: Set owner on CF Condition:On Create Action:User-defined Template: Blank Stage: TransactionCreate or TransactionBatch Custom Action Prep: # --- # # Set ticket owner based on Custom Field # KFCrocker 6/01/09 # --- # # set new ticket owner id value my $trans = $self-TransactionObj; my $ticket = $self-TicketObj; my $ownerid = 10; # Nobody my %orgs = qw( value1 999 value2 999 value3 999 ); my $cf = new RT::CustomField($RT::SystemUser); $cf-LoadByName(Queue = $ticket-QueueObj-id,Name = CF Name); return 0 unless $cf-id; my $cfvalue = $ticket-FirstCustomFieldValue('CFO-Org'); my $ownerid = $orgs{$cfvalue}; # set new Ticket Owner ID $ticket-SetOwner($ownerid); return 1; Custom Action Cleanup: return 1; Then follow up by creating a separate notification on Owner change. Hope this helps. Kenn LBNL On Thu, Dec 2, 2010 at 8:00 AM, Kurt Engle en...@4j.lane.edu wrote: I have RT::Extension::ExtractCustomFieldValues installed and working. I do not have a problem populating the CF of a ticket. What I do need is a way to test that value and then notify an e-mail address based on the CF value. Basically, I need some help with Perl to accomplish this... Kurt Engle From: Josh Narins jnar...@seniorbridge.com To: Kurt Engle en...@4j.lane.edu , rt-users rt-users@lists.bestpractical.com Sent: Thursday, December 2, 2010 6:26:56 AM Subject: RE: [rt-users] Notify based on CF Do you want a partial solution, to get started? I installed RT::Extension::ExtractCustomFieldValues and I think your first step would be to add a Scrip for On Create with action Extract Custom Field Values but exactly what you'd need to do then eludes me. Something like Create a template where the To: line is based on the value in the Custom Field But I'm still pretty new at all this RT stuff. Josh Narins Director of Application Development SeniorBridge 845 Third Ave 7th Floor New York, NY 10022 Tel: (212) 994-6194 Fax: (212) 994-4260 Mobile: (917) 488-6248 jnar...@seniorbridge.com seniorbridge.com SeniorBridge SeniorBridge Statement of Confidentiality: The contents of this email message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. Any dissemination, distribution or copying of this email by an unintended or mistaken recipient is strictly prohibited. In said event, kindly reply to the sender and destroy all entries of this message and any attachments from your system. Thank you. From: rt-users-boun...@lists.bestpractical.com [mailto: rt-users-boun...@lists.bestpractical.com ] On Behalf Of Kurt Engle Sent: Wednesday, December 01, 2010 7:05 PM To: rt-users Subject: [rt-users] Notify based on CF I am interested in setting up a notification tree based on a Custom Field value. Basically, I have one Q that accepts tickets from multiple physical locations. I have a tech at each location. I would like the tech at location X to be notified when a ticket comes in with the Custom Field Location=X . When the CF Location=Y, I want a different tech notified, etc... Thanks for any help.. Kurt Engle