[rt-users] Trouble with notification scrip
Kenneth Crocker
KFCrocker at lbl.gov
Fri May 18 13:19:59 EDT 2007
Stephan,
A question; why do you have ($trans->NewValue
&& $trans->NewValue eq "Reviewing Request")
in the code? it looks like $trans->NewValue is in there twice. I don't
understand why it is not just
if ($trans->Field == $cf->id &&
$trans->NewValue eq "Reviewing Request" )
return 1;
I'm learning here, so please be patient. Thanks.
Kenn
LBNL
Stephen Turner wrote:
> Kenn,
>
> The following code might do what you need - it's taken from a similar
> scrip we use.
>
> Steve
>
>
>
> my $trans = $self->TransactionObj;
>
> if ($trans->Type eq 'CustomField') {
> my $cf = new RT::CustomField($RT::SystemUser);
> $cf->LoadByName(Queue => $self->TicketObj->QueueObj->id,
> Name => "Approval-Status");
> return 0 unless $cf->id;
> if ($trans->Field == $cf->id && $trans->NewValue
> && $trans->NewValue eq "Reviewing Request" ) {
> return 1;
> }
> }
>
> return 0;
>
> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>
> Community help: http://wiki.bestpractical.com
> Commercial support: sales at bestpractical.com
>
>
> Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy
> a copy at http://rtbook.bestpractical.com
>
More information about the rt-users
mailing list