[rt-users] Scrip and custom field Help

Potla, Ashish Bassaliel c_apotla at qualcomm.com
Thu Mar 5 11:42:07 EST 2009


Hi Chris,
Try this:

Condition : On resolve

Custom Action Preparation Code :

# set the CF Work-Completed Date

my $trans = $self->TransactionObj;
my $ticket = $self->TicketObj;
my $cf_obj = RT::CustomField->new($RT::SystemUser);
my $cf_name = "TicketStatus";
my $cf_value = "Closed [Orbit]";

$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;

Custom cleanup code :
return 1;

-Ashish
________________________________________
From: rt-users-bounces at lists.bestpractical.com [rt-users-bounces at lists.bestpractical.com] On Behalf Of Chris Newcomb [chris at eaglehawkonline.com]
Sent: Thursday, March 05, 2009 9:42 PM
To: rt-users at lists.bestpractical.com
Subject: [rt-users] Scrip and custom field Help

I've googled and either my google fu is not working or I'm not finding
the correct answer, and I barely know perl.

Using RT 3.8.1 on freebsd using mysql

Condition: On Resolve

Action: is where I need help.

I have a custom field named TicketStatus.  I want to on resolve set the
custom field to be "Closed [Orbit]", usually the ticket status is either
Created [Orbit] or Updated [Orbit].

any pointers that you can give me would be great, either by telling me
what to search for or giving me an idea of what to use to get the action
done.

--
Thanks in advance
Chris Newcomb

_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sales at bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com



More information about the rt-users mailing list