[rt-users] "Group By" Error with CustomFields

Joop jvdwege at xs4all.nl
Mon Oct 17 10:49:32 EDT 2016


On 17-10-2016 15:56, Fisher, Michael (SON) wrote:
>
> Greetings!
>
>  
>
> I’ve had this error going on for the last 2 years or so (the cause
> seemed to be driven by adding a new Custom Field configuration). I’ve
> been on the 4.0 release for a while (upgraded to various versions
> through the 2.x and 3.x series). I hoped that it would fix itself when
> I migrated up to 4.4 (only done in test so far), but no such luck.
>
>  
>
> It is generated any time a ticket is shown through the web interface,
> so it’s a pretty frequent error!
>
>  
>
> Oct 16 17:40:36 helium postgres[4097]: [5-1] ERROR:  column
> "main.name" must appear in the GROUP BY clause or be used in an
> aggregate function at character 8
>
> Oct 16 17:40:36 helium postgres[4097]: [5-2] STATEMENT:  SELECT main.*
> FROM CustomFields main JOIN ObjectCustomFields ObjectCustomFields_1 
> ON ( ObjectCustomFields_1.CustomField = main.id )  WHERE
> (ObjectCustomFields_1.ObjectId = '33' OR ObjectCustomFields_1.ObjectId
> = '0') AND (main.Disabled = '0') AND (main.LookupType =
> 'RT::Queue-RT::Ticket-RT::Transaction')   GROUP BY main.id   ORDER BY
> MIN(ObjectCustomFields_1.SortOrder) ASC
>
>  
>
> When this fails, it seems to also prevent the Custom Fields
> functionality from working at all, which is a bummer.
>
>  
>
> I tried deleting everything from CustomFields, CustomFieldValues,
> ObjectCustomFields, and ObjectCustomFieldValues, but this didn’t help.
>
>  
>
> Environment: FreeBSD 9.3 (migrating to 10.3), PostgreSQL 9.1
> (migrating to 9.5), RT 4.0.24 (migrating to 4.4.1).
>
>  
>
> I did a new RT 4.4.1 build/database in a VM and compared the schemas
> between my upgraded RT database and the clean one, and I didn’t see
> significant differences in the CustomFields, CustomFieldValues,
> ObjectCustomFields, and ObjectCustomFieldValues tables.
>
>  
>
Have a look at the perl SearchBuilder component, it might be that your
fresh build has the latest with some adjustments to prevent the error
that is thrown in your current env.

Regards,

Joop

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20161017/6bbb63ff/attachment.html>


More information about the rt-users mailing list