[rt-users] A Scrip Condition error

Forrest Stanley fstanley at netburner.com
Fri Jan 17 17:24:51 EST 2003


This short code doesnt seem to be working properly. Looking for any 
pointers why its not. I'm guessing its something simple, as I am not really 
a perl coder. The intentions are when a person who is neither the owner or 
the requester responds to an email, the condition will fire true. While 
testing this code, I dont think it ever fires true.
thanks for the help,
-Forrest


--------------------------8<-------------------------


# ScripCondition: NonOwnNonReqCorrespond.pm
# IsApplicable returns true if correspondence is
#   completed by an unknown (not owner, not requestor)

# Created by Forrest Stanley

package RT::Condition::NonOwnNonReqCorrespond;
require RT::Condition::Generic;
@ISA = qw(RT::Condition::Generic);

sub IsApplicable {
     my $self = shift;

     my $creator = $self->TransactionObj->CreatorObj->EmailAddress;

     if ($self->TransactionObj->Type eq 'Correspond') {
         if ($self->TicketObj->IsOwner($self->CreatorObj)) { return(undef); }
         else {
	    if ($self->TicketObj->IsRequestor($self->CreatorObj)) { return(undef); }
	    else { return(1);
         }
     }
     else { return(undef); }

}
1;




More information about the rt-users mailing list