[rt-users] RT 3.0.6 - Custom Scrip Conditions on Custom Field changes
BJ Blanchard
blabj at dainty.ca
Fri Oct 31 13:38:11 EST 2003
Thanks Ruslan for pointing me in the right direction.
Just for others to see, this is what I got working:
if (($self->TransactionObj->Type eq "CustomField") and
($self->TransactionObj->Field eq 2) and
($self->TransactionObj->NewValue eq "Critical Maintenance")) {
return(1);
} else {
return(undef);
}
NOTE: I'm using the CustomFieldId of "2" above since I didn't have time
to implement the lookup by name.
If anyone wants to contribute that part, that would be great.
Now I'm looking to build a custom scrip action which adds a ticket
watcher as a "Cc".
There are no methods that I can see under TicketObj for doing this.
Anyone?
On Fri, 2003-10-31 at 10:11, Ruslan U. Zakirov wrote:
> BJ Blanchard wrote:
> > Hi,
> >
> > The custom scrip conditions in RT 3 is very powerfull, but I cannot
> > figure out how to trigger an action on a change to a "custom field".
> >
> > I've tried this to no avail:
> >
> > if ($self->TransactionObj->Field eq "NameOfCustomField") {
> > return(1);
> > } else {
> > return(undef);
> > }
> Look at this:
> mysql> select distinct Type,Field from Transactions;
> ...
> So you must use CustomFieldId instead of Name.
> To get ID from Name you can create new CF object and load it by name and
> Tickets's queue.
> Good Luck. Ruslan.
> >
> > What I really want to do is not just trigger on *any* change but trigger
> > on specific values of custom fields.
> >
> > Eg: If (( custom field modified ) and ( custom field value =
> > "somevalue")) return (1);
> >
> > Any ideas?
> >
> > -Bob
> >
> > _______________________________________________
> > rt-users mailing list
> > rt-users at lists.fsck.com
> > http://lists.fsck.com/mailman/listinfo/rt-users
> >
> > Have you read the FAQ? The RT FAQ Manager lives at http://fsck.com/rtfm
>
>
More information about the rt-users
mailing list