Ken Crocker wrote:
Matthew,Try creating a scrip that has the condition of "OnCreate", an action as "user-Defined" and put code in the prep action code area that sets the CF to the value you want (see below). Put "return 1;" in the clean-up action area. That should do it.Prep Action 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 = "Work-Completed Date"; my ( undef, undef, undef, $mon, $day, $year ) = localtime( time ); my $cf_value = sprintf( '%d/%02d/%02d', $year + 1900, $mon, $day ); $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;
Hmmm... Thanks. I'd pretty much already come to the conclusion a bit of scriping (if that's the appropriate gerund) would be necessary. Cheers, Matthew -- Dr Matthew Seaman The Bunker, Ash Radar Station PGP: 0x60AE908C on servers Marshborough Rd Tel: +44 1304 814890 Sandwich Fax: +44 1304 814899 Kent, CT13 0PL, UK
signature.asc
Description: OpenPGP digital signature
_______________________________________________ http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users Community help: http://wiki.bestpractical.com Commercial support: sa...@bestpractical.com Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com