mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
exports: create new aggregator tests + minor corrections in aggregators
This commit is contained in:
@@ -50,18 +50,15 @@ class DateAggregator implements AggregatorInterface
|
||||
switch ($data['frequency']) {
|
||||
case 'month':
|
||||
$fmt = 'MM';
|
||||
|
||||
break;
|
||||
break;
|
||||
|
||||
case 'week':
|
||||
$fmt = 'IW';
|
||||
|
||||
break;
|
||||
break;
|
||||
|
||||
case 'year':
|
||||
$fmt = 'YYYY'; $order = 'DESC';
|
||||
|
||||
break; // order DESC does not works !
|
||||
break; // order DESC does not works !
|
||||
|
||||
default:
|
||||
throw new RuntimeException(sprintf("The frequency data '%s' is invalid.", $data['frequency']));
|
||||
|
@@ -55,10 +55,10 @@ class ActivityReasonAggregator implements AggregatorInterface, ExportElementVali
|
||||
{
|
||||
// add select element
|
||||
if ('reasons' === $data['level']) {
|
||||
$elem = 'reasons.id';
|
||||
$elem = 'actreasons.id';
|
||||
$alias = 'activity_reasons_id';
|
||||
} elseif ('categories' === $data['level']) {
|
||||
$elem = 'category.id';
|
||||
$elem = 'actreasoncat.id';
|
||||
$alias = 'activity_categories_id';
|
||||
} else {
|
||||
throw new RuntimeException('The data provided are not recognized.');
|
||||
|
Reference in New Issue
Block a user