[Rt-devel] [PATCH]: Data normalisation for multi-valued CFs in GUI create

Philip Kime pkime at Shopzilla.com
Wed Feb 21 14:18:52 EST 2007

I tested this a lot and I don't think it's a problem - EnterMultiplValue
fields always return an array ref as value, even if there is one value,
for example. I was going to canonocalise it but it's neater to
standardise where it's created ...


-----Original Message-----
From: Jesse Vincent [mailto:jesse at bestpractical.com] 
Sent: Wednesday, February 21, 2007 10:09 AM
To: Philip Kime
Cc: rt-devel at lists.bestpractical.com
Subject: Re: [Rt-devel] [PATCH]: Data normalisation for multi-valued CFs
in GUI create

On Tue, Feb 20, 2007 at 11:20:00PM -0800, Philip Kime wrote:
> Rather obscure unless you're digging around in the core API and 
> dealing with CFs and validation etc. but important. Multi-valued 
> Select field values were being passed into the ticket Create() sub in 
> two different
> ways:
> * When there was only one value, as a string
> * When multi-valued, as an array ref
> This made some things I was doing with CF validation changes really 
> hard and probably should be standardised anyway (multiple Enter fields

> always get passed in as array refs, nomatter how many values) so that 
> if $cf->SingleValue is false, then the value of a CF passed in to 
> Create() can be relied upon to be an array ref.

That sounds like it's going to be an API change that's backwards
incompatible. Why can't you just do canonicalization once it's in sub


> Patch is against 3.6.3 Web.pm
> PK
> --
> Philip Kime
> NOPS Systems Architect
> 310 401 0407

> _______________________________________________
> List info: 
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-devel


More information about the Rt-devel mailing list