As discussed before, RT contains two copies of the ParseTicketId
function. However, the $RT::EmailSubjectTagRegex change was only
applied to the version in lib/RT/Interface/Email.pm, and not the one
in lib/RT/EmailParser.pm.
As discussed before, RT contains two copies of the ParseTicketId
function. However, the $RT::EmailSubjectTagRegex change was only
applied to the version in lib/RT/Interface/Email.pm, and not the one
in lib/RT/EmailParser.pm.
nod To my knowledge nothing calls the code in emailparser, but I’ll
go add a deprecation warning and make sure it instead just wraps the one
in RT::Interface::Email.
How’s this patch look?
=== lib/RT/EmailParser.pm
— lib/RT/EmailParser.pm (revision 17246)
+++ lib/RT/EmailParser.pm (local)
@@ -276,17 +276,8 @@
sub ParseTicketId {
my $self = shift;
- my $Subject = shift;
- if ( $Subject =~ s/[\Q$RT::rtname\E\s+#(\d+)\s*]//i ) {
-
my $id = $1;
-
$RT::Logger->debug("Found a ticket ID. It's $id");
-
return ($id);
- }
- else {
-
return (undef);
- }
- $RT::Logger->warnings(“RT::EmailParser->ParseTicketId deprecated. You should be using RT::Interface::Email”);
- RT::Interface::ParseTicketId(@_);
}
}}}
- Jesse Vincent:
How’s this patch look?
- RT::Interface::ParseTicketId(@_);
I think you need a “require RT::Interface::Email;” before this line.
(A file-level use statement would introduce a circularity.)
- Jesse Vincent:
How’s this patch look?
- RT::Interface::ParseTicketId(@_);
I think you need a “require RT::Interface::Email;” before this line.
Point
- Jesse Vincent:> On Mon, May 23, 2005 at 08:18:30PM +0200, Florian Weimer wrote:
- Jesse Vincent:
How’s this patch look?
- RT::Interface::ParseTicketId(@_);
I think you need a “require RT::Interface::Email;” before this line.
Point
Otherwise it looks fine.
I will give it a try with that change later this week, when my RT
installation is updated to RT 3.4.2.