[Rt-commit] r4750 - in rtir/branches/1.9-EXPERIMENTAL:
lib/RT/Condition
ruz at bestpractical.com
ruz at bestpractical.com
Mon Mar 13 20:06:57 EST 2006
Author: ruz
Date: Mon Mar 13 20:06:56 2006
New Revision: 4750
Modified:
rtir/branches/1.9-EXPERIMENTAL/ (props changed)
rtir/branches/1.9-EXPERIMENTAL/lib/RT/Condition/RTIR_CloseTicket.pm
Log:
r954 at cubic-pc: cubic | 2006-03-14 04:12:20 +0300
* use IsStatusChange method
* use RT's IsInactiveStatus and IsActiveStatus methods
** check that OldValue is active to avoid hitting changes
between inactive statuses
Modified: rtir/branches/1.9-EXPERIMENTAL/lib/RT/Condition/RTIR_CloseTicket.pm
==============================================================================
--- rtir/branches/1.9-EXPERIMENTAL/lib/RT/Condition/RTIR_CloseTicket.pm (original)
+++ rtir/branches/1.9-EXPERIMENTAL/lib/RT/Condition/RTIR_CloseTicket.pm Mon Mar 13 20:06:56 2006
@@ -63,16 +63,11 @@
sub IsApplicable {
my $self = shift;
- if (($self->TransactionObj->Type eq "Status" or
- ($self->TransactionObj->Type eq "Set" and
- $self->TransactionObj->Field eq "Status")) and
- ($self->TransactionObj->NewValue eq 'rejected' ||
- $self->TransactionObj->NewValue eq 'resolved')) {
- return 1;
- } else {
- return 0;
- }
+ return 0 unless $self->IsStatusChange;
+ return 0 unless $self->TicketObj->QueueObj->IsActiveStatus( $self->TransactionObj->OldValue );
+ return 0 unless $self->TicketObj->QueueObj->IsInactiveStatus( $self->TransactionObj->NewValue );
+ return 1;
}
eval "require RT::Condition::RTIR_CloseTicket_Vendor";
More information about the Rt-commit
mailing list