[rt-users] Making RT 3.8.1 grok References: and In-Reply-To:
Jerrad Pierce
jpierce at cambridgeenergyalliance.org
Thu Oct 30 17:17:35 EDT 2008
On Thu, Oct 30, 2008 at 16:55, Lars Kellogg-Stedman <lars at oddbit.com> wrote:
>> You can have _Local versions of core modules in extensions.
> I see that you have not actually looked at my code :).
Nope. Not necessary to answer you question about patching core.
> In addition to the one-line patch to RT/Interface/Email.pm, the bundle includes
> RT/Ticket_Local.pm and RT/Interface/Email_Local.pm.
So cleverly re-design these to include your patch, or implement a wrapper
that modifies the arguments as I did, and name it _Vendor; hoping nobody
else needs to patch RT::Interface::Email. It's perl .: TIMTOTWDI.
> The code in question is big and ugly. I could *replace* it, but I'm
> not sure that I can wrap or extend it. If you'd care to suggest a
> specific change I would appreciate the inspiration.
Big, no. Ugly, sort-of.
On a silver platter... amend your _Local to include something like:
use RT::Interface::Email;
my $core = \&RT::Interface::Email::Gateway;
*RT::Interface::Email::Gateway = sub {
my %args = %{shift};
$args{'ticket'} ||= ParseTicketId( $Subject ) || ParseReferences( $head );
$core->(\%args, @_);
}
No patching necessary.
--
Cambridge Energy Alliance: Save money & the planet
More information about the rt-users
mailing list