[rt-users] SCRIP User Defined Actions

Ruslan U. Zakirov cubic at acronis.ru
Wed Oct 22 10:49:44 EDT 2003


Jeff Klassen wrote:
> Hi,
>  
> I have been looking through the available documentation for RT3 but have 
> not been able to locate information on what is expected or required to 
> write a User Defined Action for a Scrip.
>  
> My situation is this: We have a number of custom fields created (each 
> with a selection of values), and would like to be able to automatically 
> assign a value to one or more of these custom fields when a ticket is 
> created (usually via email submission) in one of our queues.
>  
> For example, if a ticket was submitted by email into the "Europe" queue, 
> we would like a custom field called "Region" to be set to "Europe".
>  
> Could anyone provide the User Defined 'glue' that would be needed to 
> accomplish this?
>  
> With thanks.
>  
> Jeff
condition: OnCreate
action: user defined
action prep:
________________________________________
return 1;
________________________________________
action commit:
________________________________________
my ($status, $msg) = $self->TicketObj->_AddCustomFieldValue(
		Field => 'Region',
		Value => 'Europe',
		RecordTransaction => 0
	);
die $msg unless ($status);
return 1;
________________________________________

	Good luck. Ruslan.




More information about the rt-users mailing list