From e4277629534bc129fd8cd6b5f2d2246c2231ed84 Mon Sep 17 00:00:00 2001 From: sgiehl Date: Fri, 28 Jun 2024 08:55:18 +0200 Subject: [PATCH] set aggregation metadata for API --- plugins/Actions/API.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/Actions/API.php b/plugins/Actions/API.php index 06aa2c08131..a705baa7e2d 100644 --- a/plugins/Actions/API.php +++ b/plugins/Actions/API.php @@ -513,11 +513,13 @@ protected function doFilterPageDatatableSearch($callBackParameters, $table, $sea */ private function filterActionsDataTable($dataTable, $isPageTitleType) { + $dataTable->filter(function ($dataTable) { + $dataTable->setMetadata(DataTable::COLUMN_AGGREGATION_OPS_METADATA_NAME, Metrics::getColumnsAggregationOperation()); + }); // Must be applied before Sort in this case, since the DataTable can contain both int and strings indexes // (in the transition period between pre 1.2 and post 1.2 datatable structure) $dataTable->filter('Piwik\Plugins\Actions\DataTable\Filter\Actions', [$isPageTitleType]); $dataTable->filter('Piwik\Plugins\Goals\DataTable\Filter\CalculateConversionPageRate'); - return $dataTable; }