[Rt-commit] r4748 - in rtir/branches/1.9-EXPERIMENTAL:
lib/RT/Condition
ruz at bestpractical.com
ruz at bestpractical.com
Mon Mar 13 20:06:29 EST 2006
Author: ruz
Date: Mon Mar 13 20:06:28 2006
New Revision: 4748
Modified:
rtir/branches/1.9-EXPERIMENTAL/ (props changed)
rtir/branches/1.9-EXPERIMENTAL/lib/RT/Condition/RTIR_RequireStateChange.pm
Log:
r952 at cubic-pc: cubic | 2006-03-14 04:06:08 +0300
* use IsStatusChange method
Modified: rtir/branches/1.9-EXPERIMENTAL/lib/RT/Condition/RTIR_RequireStateChange.pm
==============================================================================
--- rtir/branches/1.9-EXPERIMENTAL/lib/RT/Condition/RTIR_RequireStateChange.pm (original)
+++ rtir/branches/1.9-EXPERIMENTAL/lib/RT/Condition/RTIR_RequireStateChange.pm Mon Mar 13 20:06:28 2006
@@ -63,19 +63,16 @@
sub IsApplicable {
my $self = shift;
- if ($self->TransactionObj->Type eq "Status" or
- ($self->TransactionObj->Type eq "Set" and
- $self->TransactionObj->Field eq "Status") or
- ($self->TransactionObj->Type eq "AddLink" and
- $self->TransactionObj->Field eq "MemberOf") or
- $self->TransactionObj->Type eq "Create" or
- $self->TransactionObj->Type eq "CustomField" or
- ($self->TransactionObj->Type eq "Set" and
- $self->TransactionObj->Field eq "Queue")) {
- return 1;
- } else {
- return 0;
- }
+ my $type = $self->TransactionObj->Type;
+ return 1 if $type eq "Create" or $type eq "CustomField";
+ return 1 if $self->IsStatusChange;
+
+ my $field = $self->TransactionObj->Field;
+ return 1 if
+ ( $type eq "AddLink" and $field eq "MemberOf" ) or
+ ( $type eq "Set" and $field eq "Queue" );
+
+ return 0;
}
eval "require RT::Condition::RTIR_RequireStateChange_Vendor";
More information about the Rt-commit
mailing list