TicketIDMatches

From Request Tracker Wiki
Jump to navigation Jump to search

This condition appears to be missing a database row as part of the example

package RT::Condition::TicketIDMatches;
 
 use RT::Condition::Generic;
 
 use strict;
 use vars qw/@ISA/;
 @ISA = qw(RT::Condition::Generic);
 
 
 =head2 IsApplicable
 
 This happens on every transaction. it's always applicable
 
 =cut
 
 sub IsApplicable {
    my $self = shift;
    if ($self->TicketObj->Id eq $self->Argument)  {
        return(1);
    }
    else {
        return(undef);
    }
 
 eval "require RT::Condition::TicketIDMatches_Vendor";
 die $@ if ($@ && $@ !~ qr{^Can't locate RT/Condition/TicketIDMatches_Vendor.pm});
 eval "require RT::Condition::TicketIDMatches_Local";
 die $@ if ($@ && $@ !~ qr{^Can't locate RT/Condition/TicketIDMatches_Local.pm});
 
 1;