[rt-users] referencing a specific Custom Field in a script

Terri Bendl terri.bendl at ezpass.csc.paturnpike.com
Thu Aug 17 16:59:06 EDT 2006


> We are trying to create a scrip that sets the Priority based on a custom field called "Severity".
> For example, if Severity = Urgent, the Priority should = 100.
> Here is the script we are using. I have seen other posts of people using this syntax, but we simply cannot get it to work.
> 
> Condition: On Create
> Action: User Defined
> Custom action preparation code:
> return 1;
> 
> Custom action cleanup code:
> if ($self->TicketObj->FirstCustomFieldValue('Severity') eq "Urgent") {
>    $self->TicketObj->SetPriority( 100 );
>    return 1;
> }
> 
> Stage: TransactionCreate
> Template: Blank
> 
> It is definitely a problem with the custom field portion of the code... (the SetPriority part works fine if we get rid of the first line that references the custom field)
> Any advise???
> 
> We are using RT 3.0.8rc1
> 
> Thanks in advance.
> 
> Terri Bendl
> Network Administrator
> 
> 
> 



More information about the rt-users mailing list