[Rt-commit] r7330 - in rt/branches/3.7-EXPERIMENTAL: .
ruz at bestpractical.com
ruz at bestpractical.com
Thu Mar 22 21:39:44 EDT 2007
Author: ruz
Date: Thu Mar 22 21:39:43 2007
New Revision: 7330
Modified:
rt/branches/3.7-EXPERIMENTAL/ (props changed)
rt/branches/3.7-EXPERIMENTAL/lib/RT/Action/SendEmail.pm
Log:
r4784 at cubic-pc: cubic | 2007-03-23 04:30:19 +0300
* attach only attachments attached to Create and Correpsond transactions
Modified: rt/branches/3.7-EXPERIMENTAL/lib/RT/Action/SendEmail.pm
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/lib/RT/Action/SendEmail.pm (original)
+++ rt/branches/3.7-EXPERIMENTAL/lib/RT/Action/SendEmail.pm Thu Mar 22 21:39:43 2007
@@ -331,7 +331,9 @@
# XXX: we need a current user here, but who is current user?
my $attachs = RT::Attachments->new( $RT::SystemUser );
- # XXX: comments, correspondence or any?
+ my $txn_alias = $attachs->TransactionAlias;
+ $attachs->Limit( ALIAS => $txn_alias, FIELD => 'Type', VALUE => 'Create' );
+ $attachs->Limit( ALIAS => $txn_alias, FIELD => 'Type', VALUE => 'Correspond' );
$attachs->LimitByTicket( $tid );
$attachs->LimitNotEmpty;
$attachs->OrderBy( FIELD => 'Created' );
More information about the Rt-commit
mailing list