[rt-devel] Module::Install and RTxInitDB
Kevin Falcone
falcone at bestpractical.com
Thu Nov 8 23:00:34 EST 2012
On Thu, Nov 08, 2012 at 10:13:30PM -0500, Kevin Falcone wrote:
> I still need to go through tcutts/4.0/replies-to-resolved but assume
> something will see trunk to support the feature.
Tim - after looking at this branch, I believe I'm fine with the
change, but I wanted to rebase the branch and squash it into a single
commit. I've attached the resulting patch below, because I did reword
your commit messages. I also noticed that you're using a different
committer address than you normally do. You may want to update your
branch, or I can just change the committer address when I publish your
branch into the main repo before merging.
-kevin
-------------- next part --------------
From 123d4576dd6ce138d47d951f533d5cf0c001896a Mon Sep 17 00:00:00 2001
From: Tim Cutts <tim at thecutts.org>
Date: Tue, 16 Oct 2012 22:36:17 +0100
Subject: [PATCH] Re-read Subject from Message after ExtractTicketId
Since 4.0.7, ExtractTicketId can be overridden, as in
RT::Extension::RepliesToResolved. The override might change the Subject
of the message (as the above extension does).
Keep the original subject for error messages, but if ExtractTicketId has
changed the subject, use that for the new ticket creation.
---
lib/RT/Interface/Email.pm | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/lib/RT/Interface/Email.pm b/lib/RT/Interface/Email.pm
index ca14e93..80b1c62 100644
--- a/lib/RT/Interface/Email.pm
+++ b/lib/RT/Interface/Email.pm
@@ -1461,6 +1461,10 @@ sub Gateway {
$args{'ticket'} ||= ExtractTicketId( $Message );
+ # ExtractTicketId may have been overridden, and edited the Subject
+ my $NewSubject = $Message->head->get('Subject');
+ chomp $NewSubject;
+
$SystemTicket = RT::Ticket->new( RT->SystemUser );
$SystemTicket->Load( $args{'ticket'} ) if ( $args{'ticket'} ) ;
if ( $SystemTicket->id ) {
@@ -1547,7 +1551,7 @@ sub Gateway {
my ( $id, $Transaction, $ErrStr ) = $Ticket->Create(
Queue => $SystemQueueObj->Id,
- Subject => $Subject,
+ Subject => $NewSubject,
Requestor => \@Requestors,
Cc => \@Cc,
MIMEObj => $Message
--
1.8.0
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 235 bytes
Desc: not available
URL: <http://lists.bestpractical.com/pipermail/rt-devel/attachments/20121108/92ec1aae/attachment.pgp>
More information about the rt-devel
mailing list