[Rt-devel] Problem with CF for Users

Kevin Falcone falcone at bestpractical.com
Wed Feb 9 09:27:10 EST 2011


On Wed, Feb 09, 2011 at 03:22:07PM +0100, Björn Schulz wrote:
> Hi Kevin,
> 
> Am 08.02.11 17:40, schrieb Kevin Falcone:
> > On Tue, Feb 08, 2011 at 02:49:17PM +0100, Björn Schulz wrote:
> >> Hi all,
> >>
> >> we've a problem with custom fields for users on rt 3.8.8.
> > 
> > It is worth noting that Tickets_Overlay.pm has a LimitCustomField but
> > Users is falling back to the generic code in RT::SearchBuilder.
> > I suggest a ->BuildSelectQuery to confirm what the sql is doing, but
> > if I had to guess, I'd suspect that Users isn't skipping disabled OCFV
> > records, which means that the old value for that user is found.
> 
> sql is doing everything right.

That appears to be custom SQL, I meant what does BuildSelectQuery spit
out for the ticket vs the user and extra where clauses.

If I'm correct, adding an explicit Limit for FIELD => Disabled, Value
=> 0 it'll fix things.

> mysql> select Customfield, ObjectType, ObjectId, Content, Disabled from
>  ObjectCustomFieldValues where ObjectType ='RT::User' and
> Customfield=126  and ObjectId=1227122;
> +-------------+------------+----------+---------+----------+
> | Customfield | ObjectType | ObjectId | Content | Disabled |
> +-------------+------------+----------+---------+----------+
> |         126 | RT::User   |  1227122 | A9428   |        1 |
> |         126 | RT::User   |  1227122 | A9488   |        0 |
> +-------------+------------+----------+---------+----------+
> 2 rows in set (0.00 sec)
> 
> Do you thing this is a bug?

I'm not sure what changing Record's LimieCustomField would do to the
rest of RT without trying it and running the test suite.

-kevin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <http://lists.bestpractical.com/pipermail/rt-devel/attachments/20110209/e8b40205/attachment.pgp>


More information about the rt-devel mailing list