[rt-users] ExtractCustomFieldValues and ContentObj question
Flynn, Timothy J
timothy-flynn at uiowa.edu
Tue Feb 14 14:41:26 EST 2006
False alarm. I bounced apache a couple times and it seems to have gone
away. Hopefully that is all it was. Anyway, if this works as it is now
it is an easy change for those of you using ExtractCustomFields to make
attachments work.
I noticed that I didn't included the version of ExtractCustomFieldValues
I was using. It is 1.2b1
Only other issue I am trying to solve now is how to read in data that is
multiple lines. Some email clients autowrap outbound messages and they
are being truncated. Only way I can think of is reading content into a
scalar and removing the linebreaks and doing the matching against that.
Thanks,
-Tim
-----Original Message-----
From: rt-users-bounces at lists.bestpractical.com
[mailto:rt-users-bounces at lists.bestpractical.com] On Behalf Of Flynn,
Timothy J
Sent: Tuesday, February 14, 2006 10:59 AM
To: rt-users at lists.bestpractical.com
Subject: [rt-users] ExtractCustomFieldValues and ContentObj question
This is on RT 3.4.4, redhat.
I'm using the ExtractCustomFieldValues add on to read in the fields from
an email. This doesn't seem to be compatible with attachments so I came
up with what I thought was a fix, but it only works 50% of the time. In
ExtractCustomFieldValues.pm I made the changes below:
I changed the line:
my $FirstAttachment = $Transaction->Attachments->First;
To read:
my $FirstAttachment = $Transaction->ContentObj;
Based on the description for ContentObj in the Transaction_Overlay.pm it
looks for the text part of the content which is exactly what I am after,
and returns that attachment. Seemed to work good at first, attachments
came in fine along with custom fields.
Then, when I would send the exact same email (generated from a program,
no changes) I would get this error in the RT log, ... Sometimes :) .
Can't locate object method "ContentObj" via package
"RT::Action::ExtractCustomFieldValues"
And a stack dump...
Any idea why the ContentObj would exist sometimes and not others with
the same data on a new ticket each time? Is there something in the
background that is just completing before I call this sometimes and not
others?
I didn't really want to just duplicate what ContentObj does in
ExtractCustomFieldValues.pm but I guess I can if that's what it needs.
Thanks!
-Tim
_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
Be sure to check out the RT Wiki at http://wiki.bestpractical.com
Download a free sample chapter of RT Essentials from O'Reilly Media at
http://rtbook.bestpractical.com
WE'RE COMING TO YOUR TOWN SOON - RT Training in Amsterdam, Boston and
San Francisco - Find out more at
http://bestpractical.com/services/training.html
More information about the rt-users
mailing list