Re: [rt-users] ExtractCustomFieldValues and CF Select type

2013-08-27 Thread elifree
Thanks Kevin, it's exactly the problem !

Now, as I have no knowledge in perl, I've copied the regex from an example
on the RT wiki. 
I'll try to find the right regex by myself, but if you have the solution,
I'll take it with pleasure !

Thanks again,
Elisabeth



--
View this message in context: 
http://requesttracker.8502.n7.nabble.com/ExtractCustomFieldValues-and-CF-Select-type-tp55097p55103.html
Sent from the Request Tracker - User mailing list archive at Nabble.com.


Re: [rt-users] ExtractCustomFieldValues and CF Select type

2013-08-26 Thread Kevin Falcone
On Mon, Aug 26, 2013 at 07:30:08AM -0700, elifree wrote:
 I'm using RT 4.0.10 (on a test machine) and I'm testing the extension
 ExtractCustomFieldValues to insert a value to a custom field (Select type
 with a list of 4 values).
 
 The incoming mail contains the value :
Type du ticket-Incident
 
 the template contains :
Type du ticket|Body|Type du ticket-(.+)$|q|
 
 then The ticket is created, and displays on the main page :
Type du ticket:Incident 
 
 but when I modify the ticket (the basics), on the list of values of this CF,
 the blue line is set on (no information) and not on Incident.
 
 So if I want to modify any field there, I must re-select the value Incident
 before saving, otherwise it's lost.
 
 For example, the history of the ticket shows  :
 - at the creation of the ticket :
The RT System itself - Type du ticket Incident added 
 - after modifying :
'/the name of the owne/r' - Type du ticket Incident removed
  
 With CF using type Freeform there is no problem, the value is correctly
 inserted at creation time.
 
 I've been searching for a while, I suppose it's simple, but even after some
 holidays, I still don't find the reason why the correct value is not
 selected.

I'd bet your greedy regex (.+)$ is grabbing trailing whitespace, which
doesn't exactly match the value in the select one CF.

You can go look in the ObjectCustomFieldValues table for the value of
the CF on your test ticket and check to see what the actual Content
is.

-kevin


pgpZtt1AupU_L.pgp
Description: PGP signature