[Rt-commit] r11004 - rt/branches/3.6-EXPERIMENTAL-ABERDEEN/lib/RT/Action
audreyt at bestpractical.com
audreyt at bestpractical.com
Wed Mar 5 00:35:22 EST 2008
Author: audreyt
Date: Wed Mar 5 00:35:18 2008
New Revision: 11004
Modified:
rt/branches/3.6-EXPERIMENTAL-ABERDEEN/lib/RT/Action/RuleManager.pm
Log:
* RT::Action::RuleManager - Correctly test From and Body fields.
Modified: rt/branches/3.6-EXPERIMENTAL-ABERDEEN/lib/RT/Action/RuleManager.pm
==============================================================================
--- rt/branches/3.6-EXPERIMENTAL-ABERDEEN/lib/RT/Action/RuleManager.pm (original)
+++ rt/branches/3.6-EXPERIMENTAL-ABERDEEN/lib/RT/Action/RuleManager.pm Wed Mar 5 00:35:18 2008
@@ -91,10 +91,18 @@
my $field = $rule->Field;
my $val;
+
if ($self->TransactionObj->can($field)) {
$val = $self->TransactionObj->$field;
}
- elsif (my $att = $self->TransactionObj->Attachments->First) {
+ elsif ($field eq 'From') {
+ $val = $self->TransactionObj->CreatorObj->EmailAddress
+ || $self->TransactionObj->CreatorObj->Name;
+ }
+ elsif ($field eq 'Body') {
+ $val = $self->TransactionObj->ContentObj->Content;
+ }
+ elsif (my $att = $self->TransactionObj->ContentObj) {
if ($att->can($field)) {
$val = $att->$field;
}
More information about the Rt-commit
mailing list