Aggregation in Views not working on CiviCRM Entitire

Created on 29 May 2023, over 1 year ago
Updated 29 September 2023, about 1 year ago

Problem/Motivation

If I invoke aggregation in a View showing a CiviCRM Entity, I frequently get no results to the query. In particular I am interested in showing, and being able to filter on, the Maximum value of e.g. the date of an Event which a Contact attended, but the fault occurs in much simpler situations.

Steps to reproduce

This is with Drupal 9.5.9, CiviCRM 5.60.0, CiviCRM_Entity 8.x-3.4

Trial 1

  • Create View of CiviCRM Contacts; Select fields: Contact Id, Display Name, Created Date, all with default configuration. Display mode 'Table with Aggregation''.
  • Initially with no aggregation: it shows each field as expected
  • Set 'Group and Compress' on Id. and 'Display First Member' on other two fields – shows preview as expected.
  • Save the View – Preview is empty. View Page timed out.
  • No errors shown in the error log.

Trial 2

  • Create View of CiviCRM Contacts; Select fields: Contact Id, Display Name, Created Date, all with default configuration. Display mode 'Table with Aggregation''.
  • Initially with no aggregation: it shows each field as expected
  • Set 'Group and Compress' on Id. and 'Count' on other two fields – shows counts of one in preview as expected.
  • Save the View – Preview remains as expected View Page timed out.
  • No errors shown in the error log.

Trial 3

  • Create View of CiviCRM Contacts; Select fields: Contact Id, Display Name, Created Date, all with default configuration. Display mode 'Table with Aggregation''.
  • Initially with no aggregation: it shows each field as expected
  • Set 'Group and Compress' on Id. and 'Maximum' on other two fields – shows the (single) maximum value in preview as expected.
  • Save the View – Preview is empty View Page timed out.
  • No errors shown in the error log.

Similar problems occur if I switch on Aggregation on the Advanced section of the Views configuration page.

Attached file is an export of the Trial 1 above, at the end of the sequence shown.

🐛 Bug report
Status

Active

Version

3.4

Component

Code

Created by

🇬🇧United Kingdom maynardsmith

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024