Closed (fixed)
Project:
Views CSV Source
Version:
1.0.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
2 Dec 2025 at 15:17 UTC
Updated:
16 Dec 2025 at 16:34 UTC
Jump to comment: Most recent
If a View is not aggregated, the field should not show an aggregation function.
Add two fields.
Enable aggregation for the View.
Configure the aggregation settings for the second field, applying an "average" on the field.
Check the query to see "avg" on the field.
Disable aggregation.
Check the query: "avg" will still be on the field.
Add
$use_aggregation = $this->view->display_handler->useGroupBy();
$group_type = $use_aggregation ? $this->options['group_type'] : 'group';
$params = $group_type != 'group' ? ['function' => $group_type] : [];
to the query method of the field.
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
andileco commentedComment #4
nikathoneLooks good to me.
Comment #5
andileco commented