Skip to content

Commit

Permalink
Merge pull request mautic#7919 from kuzmany/fix-report-group-stats
Browse files Browse the repository at this point in the history
All columns for agregators in  Reports
  • Loading branch information
dennisameling authored Mar 11, 2020
2 parents 9eca7f7 + a0daaa2 commit 7e67bdc
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions app/bundles/PageBundle/EventListener/ReportSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,10 @@ public function onReportBuilder(ReportBuilderEvent $event)
$hitPrefix = 'ph.';
$redirectHit = 'r.';
$hitColumns = [
$hitPrefix.'id' => [
'label' => 'mautic.page.report.hits.id',
'type' => 'int',
],
$hitPrefix.'date_hit' => [
'label' => 'mautic.page.report.hits.date_hit',
'type' => 'datetime',
Expand Down
1 change: 1 addition & 0 deletions app/bundles/PageBundle/Translations/en_US/messages.ini
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ mautic.page.report.variant_hits="A/B test hit count"
mautic.page.report.variant_parent_id="A/B test parent ID"
mautic.page.report.variant_parent_title="A/B test parent title"
mautic.page.report.variant_start_date="A/B test start date"
mautic.page.report.hits.id="Page hit ID"
mautic.report.group.videos="Videos"
mautic.video.hits="Video hits"
mautic.page.report.hits.time_watched="Time watched"
Expand Down
2 changes: 1 addition & 1 deletion app/bundles/ReportBundle/Assets/js/report.js
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ Mautic.getHighestIndex = function (selector) {
var selectorChildren = mQuery('#' + selector + ' > div');

selectorChildren.each(function() {
var index = mQuery(this).attr('id').split('_')[2];
var index = parseInt(mQuery(this).attr('id').split('_')[2]);
highestIndex = (index > highestIndex) ? index : highestIndex;
});

Expand Down
2 changes: 1 addition & 1 deletion app/bundles/ReportBundle/Form/Type/ReportType.php
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ public function buildForm(FormBuilderInterface $builder, array $options)
'type' => 'aggregator',
'label' => false,
'options' => [
'columnList' => $groupByColumns->choices,
'columnList' => $columns->choices,
'required' => false,
],
'allow_add' => true,
Expand Down

0 comments on commit 7e67bdc

Please sign in to comment.