[rt-users] help with ExtractCustomFieldValues

Chris Haumesser ch at awry.ws
Mon Apr 14 04:56:29 EDT 2008


Ryan Fox <rfox <at> findlay.edu> wrote on 2006-01-10:

> So it seems as though in a multipart message, the text/plain part does 
> not get parsed by ExtractCustomFieldValues. 
> My question now is, is there an easy way to make that happen?

I'm running into this same problem. ExtractCustomFieldValues is working great on
simple plaintext mail.  But as soon as I add an attachment, it stops working. 
It's essential that I get this fixed, and my perl is sorely lacking.  I think
the problem is around line 22 of ExtractCustomFieldValues.pm:

    my $FirstAttachment = $Transaction->Attachments->First;
    unless ( $FirstAttachment ) { return 1; }


then later, around line 46:


    my $match = FindMatch( Field           => $InspectField,
                       Match           => $MatchString,
                       FirstAttachment => $FirstAttachment );


The full perl module can be found at http://tinyurl.com/4c9d3n .


At any rate, it seems to me that the module is only checking the "first
attachment" to the ticket (same as the first mimepart?  which equals just the
headers on a multipart message?).  


How can I easily work around this?  I tried setting 

    my $FirstAttachment = $Transaction->Attachments->Second;

but that did not work.


Any help much appreciated...


-C-




 





More information about the rt-users mailing list