[rt-users] Notify based on CF
Kurt Engle
engle at 4j.lane.edu
Thu Dec 2 12:37:57 EST 2010
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" <kfcrocker at lbl.gov>
To: rt-users at 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 < engle at 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" < jnarins at seniorbridge.com >
To: "Kurt Engle" < engle at 4j.lane.edu >, "rt-users" < rt-users at 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
jnarins at 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-bounces at lists.bestpractical.com [mailto: rt-users-bounces at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20101202/5b98e523/attachment.htm>
More information about the rt-users
mailing list