OnPage

I’m trying to set up an OnPage condition that would be satisfied if the
Owner is set to “oncall”. Does the code below seem right?

sub IsApplicable {
my $self = shift;

if (($self->TransactionObj->Field eq 'Owner') and
($self->TransactionObj->NewValue =~ /oncall/ )) {
    return(1);
}
else {
    return(undef);
}

}

ccoy.vcf (198 Bytes)

Owner values are specified by UserId in the database.

you may want something more like this:

my $oncall = new RT::User($RT::SystemUser);
$oncall->Load(‘oncall’);

if (($self->TransactionObj->Field eq ‘Owner’) and
($self->TransactionObj->NewValue == $oncall->Id)) {On Wed, Dec 19, 2001 at 02:21:14PM -0500, Carrie Coy wrote:

I’m trying to set up an OnPage condition that would be satisfied if the
Owner is set to “oncall”. Does the code below seem right?

sub IsApplicable {
my $self = shift;

if (($self->TransactionObj->Field eq 'Owner') and
($self->TransactionObj->NewValue =~ /oncall/ )) {
    return(1);
}
else {
    return(undef);
}

}

http://www.bestpractical.com/products/rt – Trouble Ticketing. Free.