[Rt-commit] rt branch, 4.4/extractid-mime, created. rt-4.4.1-334-gedcc693
Shawn Moore
shawn at bestpractical.com
Thu May 4 11:14:01 EDT 2017
The branch, 4.4/extractid-mime has been created
at edcc69309aeaa59113b8d500b2dea6de6be35f52 (commit)
- Log -----------------------------------------------------------------
commit edcc69309aeaa59113b8d500b2dea6de6be35f52
Author: Shawn M Moore <shawn at bestpractical.com>
Date: Thu May 4 11:13:43 2017 -0400
Provide MIME::Entity to ParseTicketId too
Fixes: T#182304
diff --git a/lib/RT/Interface/Email.pm b/lib/RT/Interface/Email.pm
index 7466c0f..1ef2ca7 100644
--- a/lib/RT/Interface/Email.pm
+++ b/lib/RT/Interface/Email.pm
@@ -607,12 +607,15 @@ sub ExtractTicketId {
my $subject = Encode::decode( "UTF-8", $entity->head->get('Subject') || '' );
chomp $subject;
- return ParseTicketId( $subject );
+ return ParseTicketId( $subject, $entity );
}
=head3 ParseTicketId
-Takes a string and searches for [subjecttag #id]
+Takes a string (the email subject) and searches for [subjecttag #id]
+
+For customizations, the L<MIME::Entity> object is passed as the second
+argument.
Returns the id if a match is found. Otherwise returns undef.
@@ -620,6 +623,7 @@ Returns the id if a match is found. Otherwise returns undef.
sub ParseTicketId {
my $Subject = shift;
+ my $Entity = shift;
my $rtname = RT->Config->Get('rtname');
my $test_name = RT->Config->Get('EmailSubjectTagRegex') || qr/\Q$rtname\E/i;
-----------------------------------------------------------------------
More information about the rt-commit
mailing list