[rt-users] custom scrip, user-defined condition on custom field
Bob Goldstein
bobg at uic.edu
Wed Jul 7 23:09:19 EDT 2004
>On Wed, Jul 07, 2004 at 08:57:54AM -0500, Bob Goldstein wrote:
>>
>> I recently wrote a Custom Scrip Condition for use with
>> Custom Fields. It's fairly generic, you pass it an argument
>> saying which CustomField, and a bit 'o perl specifying how
>> to test the CF value(s). So it can be re-used for any
>> transaction type, and any custom field test.
>>
>> If you like, I can send you the code. And if it works for
>> you, I'll put it on the wiki. (It's working for me,
>> using RT 3.2.0. I think it would work on any 3.x.x)
>>
>> bobg
>>
>Bob,
>
>Does your code look something like this?
>
>return undef unless ($self->TicketObj->FirstCustomFieldValue('Name_of_your_Cus
>tom_Field') =~ /matchtext/i);
>return 1;
>
>(from http://wiki.bestpractical.com/index.cgi?ExampleOfCustomFieldInCondition)
>
>If you've got a different/better implementation, please do let me know!
>
Neither better nor worse, just different.
My solution was a more generic one, to make a reusable,
configurable ScripCondition. Yours is to write custom code
into a single Scrip.
bobg
More information about the rt-users
mailing list