summaryrefslogtreecommitdiff
path: root/rt/lib/RT/Condition/OwnerChange.pm
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2015-07-09 22:18:55 -0700
committerIvan Kohler <ivan@freeside.biz>2015-07-09 22:18:55 -0700
commit1c538bfabc2cd31f27067505f0c3d1a46cba6ef0 (patch)
tree96922ad4459eda1e649327fd391d60c58d454c53 /rt/lib/RT/Condition/OwnerChange.pm
parent4f5619288413a185e9933088d9dd8c5afbc55dfa (diff)
RT 4.2.11, ticket#13852
Diffstat (limited to 'rt/lib/RT/Condition/OwnerChange.pm')
-rw-r--r--rt/lib/RT/Condition/OwnerChange.pm16
1 files changed, 10 insertions, 6 deletions
diff --git a/rt/lib/RT/Condition/OwnerChange.pm b/rt/lib/RT/Condition/OwnerChange.pm
index 867e632a8..73689710c 100644
--- a/rt/lib/RT/Condition/OwnerChange.pm
+++ b/rt/lib/RT/Condition/OwnerChange.pm
@@ -62,12 +62,16 @@ If we're changing the owner return true, otherwise return false
sub IsApplicable {
my $self = shift;
- if ( ( $self->TransactionObj->Field || '' ) eq 'Owner' ) {
- return(1);
- }
- else {
- return(undef);
- }
+ return unless ( $self->TransactionObj->Field || '' ) eq 'Owner';
+
+ # For tickets, there is both a Set txn (for the column) and a
+ # SetWatcher txn (for the group); we fire on the former for
+ # historical consistency. Non-ticket objects will not have a
+ # denormalized Owner column, and thus need fire on the SetWatcher.
+ return if $self->TransactionObj->Type eq "SetWatcher"
+ and $self->TransactionObj->ObjectType eq "RT::Ticket";
+
+ return(1);
}
RT::Base->_ImportOverlays();