This is a follow up of: #652812: get_count_optimized & has_aggregate undefined in views_plugin_query_default.inc

I wrote another test that fails. The problem is that 652812 only check if has_aggregate is setted to TRUE when fields are analysed, however in views that doesn't display COUNT, SUM, MAX, etc in the SELECT statement like this simple query:

SELECT type 
FROM node 
GROUP BY type
HAVING COUNT(nid) > 3

GROUP BY and HAVING are not added.

Patch with the new GROUP BY test and patch to fix this bug are attached.

Comments

dagmar’s picture

Issue tags: +alpha-2 blocker

Tagging

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

works fine.

It would be cool if the tests would be committed too.

merlinofchaos’s picture

Version: 6.x-3.x-dev » 7.x-3.x-dev
Status: Reviewed & tested by the community » Patch (to be ported)

Committed to 6.x-3.x, with test.

dawehner’s picture

Status: Patch (to be ported) » Closed (fixed)

Thats already part of the group-by-d7 patch

dawehner’s picture

Issue tags: -alpha-2 blocker

remove tag