[Rt-commit] r4749 - in rtir/branches/1.9-EXPERIMENTAL:
lib/RT/Condition
ruz at bestpractical.com
ruz at bestpractical.com
Mon Mar 13 20:06:46 EST 2006
Author: ruz
Date: Mon Mar 13 20:06:41 2006
New Revision: 4749
Modified:
rtir/branches/1.9-EXPERIMENTAL/ (props changed)
rtir/branches/1.9-EXPERIMENTAL/lib/RT/Condition/RTIR_ReopenTicket.pm
Log:
r953 at cubic-pc: cubic | 2006-03-14 04:08:00 +0300
* use IsStatusChange methods
* use RT's IsInactiveStatus and IsActiveStatus methods
Modified: rtir/branches/1.9-EXPERIMENTAL/lib/RT/Condition/RTIR_ReopenTicket.pm
==============================================================================
--- rtir/branches/1.9-EXPERIMENTAL/lib/RT/Condition/RTIR_ReopenTicket.pm (original)
+++ rtir/branches/1.9-EXPERIMENTAL/lib/RT/Condition/RTIR_ReopenTicket.pm Mon Mar 13 20:06:41 2006
@@ -63,17 +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->OldValue eq 'rejected' ||
- $self->TransactionObj->OldValue eq 'resolved') &&
- $self->TransactionObj->NewValue eq 'open')) {
- return 1;
- } else {
- return 0;
- }
+ return 0 unless $self->IsStatusChange;
+ return 0 unless $self->TicketObj->QueueObj->IsInactiveStatus( $self->TransactionObj->OldValue );
+ return 0 unless $self->TicketObj->QueueObj->IsActiveStatus( $self->TransactionObj->NewValue );
+ return 1;
}
eval "require RT::Condition::RTIR_ReopenTicket_Vendor";
More information about the Rt-commit
mailing list