[rt-users] SCRIP User Defined Actions
Jeff Klassen
jklassen at biblesociety.ca
Thu Oct 23 12:05:28 EDT 2003
Ruslan, others,
I now have the following scrip set up for a queue in our RT installation
called 'support_em'
Description: Set region field
Condition: On Create
Custom Condition: <none>
Action: User Defined
Custom action preparation code:
return 1;
Custom action cleanup code:
my $cf_name = 'Region';
my $cf = RT::CustomField->new($RT::SystemUser);
$cf->LoadByNameAndQueue(Name => $cf_name,
Queue => $self->TicketObj->Queue);
die "No such CustomField '$cf_name'" unless($cf->id);
my ($status, $msg) = $self->TicketObj->RT::Ticket::AddCustomFieldValue(
Field => $cf,
Value => 'UBS Europe/Middle East',
RecordTransaction => 0
);
die $msg unless ($status);
return 1;
Template: Global template: Blank
What I would like to happen is for an email sent in to this queue to
automatically have the custom field "Region" set to "UBS Europe/Middle
East". Ruslan has provided the code above, but this still does not work. Can
anyone spot a problem here?
Thanks a lot everyone.
Jeff
More information about the rt-users
mailing list