Just thought I would add this to the thread. This is the custom
condition that which lets you do this with only 1 scrip.
my $trans = $self->TransactionObj;
#Check if this is a create ticket transaction if so return one and run action
$RT::Logger->debug("check if this is a create ticket transaction");
return 1 if $trans->Type eq 'Create';
#If there is no requestor field we return 0
$RT::Logger->debug("return 0 if no requestor field");
return 0 unless $trans->Field eq 'Requestor';
#Check if the requestor field has been modified
if ($trans->OldValue != $trans->NewValue) {
$RT::Logger->debug("requestor address has been changed");
return 1;
}
return 0;
cheers
John
On 1/6/06, Mike Patterson <[EMAIL PROTECTED]> wrote:
I submitted the errata I found and I'll submit any others I come up with.
To really keep track of dept this way, you need to check everytime the
Requestor value changes.
-------------------------------------------------------------------------------------------------
Now I have 2 scrips:
1) that checks "OnCreate" and uses the custom action I was troubleshooting
2) one custom condition (below) that uses the same custom action
custom condition:
-----------------
my $trans = $self->TransactionObj;
return 0 unless $trans->Field eq 'Requestor';
return 1 if $trans->OldValue != $trans->NewValue;
return 0;
Michael Finn wrote:
>>Does anyone know if there is an errata page for RT Essentials?
>>
>>
>
>O'Reilly keeps errata pages for pretty much all their books. Check:
>http://www.oreilly.com/catalog/rtessentials/errata/
>
>
--
Mike Patterson
Systems Manager
UC Berkeley Extension
_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
Be sure to check out the RT Wiki at http://wiki.bestpractical.com
Download a free sample chapter of RT Essentials from O'Reilly Media at
http://rtbook.bestpractical.com
WE'RE COMING TO YOUR TOWN SOON - RT Training in Amsterdam, Boston and
San Francisco - Find out more at http://bestpractical.com/services/training.html
--
John Habermann
Internet Programmer, System Administrator
The Wilderness Society Inc
http://www.wilderness.org.au
_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]
Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com
We're hiring! Come hack Perl for Best Practical:
http://bestpractical.com/about/jobs.html