TicketIDMatches: Difference between revisions

From Request Tracker Wiki
Jump to navigation Jump to search
m (2 revisions imported)
 
(No difference)

Latest revision as of 15:39, 6 April 2016

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;