-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding new PivotByDimension DataTable filter that can pivot a report by (almost) any dimension. #6243
Conversation
…by (almost) any dimension. The filter can pivot reports by their subtable dimension and can also pivot by other dimensions (by using segments). Notes: - in the UI, only pivoting by subtable is supported - change to CSV DataTable renderer so column names w/ commas & quotes can appear in text - change to XML DataTable renderer so column names w/ invalid XML characters can be rendered (bit of an iffy change, XML format needs an overhaul I think) - includes new config option 'pivot_by_filter_enable_fetch_by_segment' - includes additions to component metadata classes (ie, Report/Dimension)
…when fetching intersected tables by segment.
…ure pivotBy works w/ Events plugins' secondaryDimension query parameter..
…tables of specific reports and use in Events to display nb_events. Also do not set columns_to_display in Events plugin if table is pivoted.
. "pivot by dimension = {$this->pivotByDimension->getId()}]"); | ||
} | ||
} else { | ||
$canFetchBySubtable = !empty($this->subtableDimension) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you may reuse isPivotDimensionSubtable()
here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That won't provide as detailed exception messages; splitting the call up will be better for debugging.
The other changes discussed:
Looking forward to next iteration and feel free to merge once review items are covered! Notes:
|
Re test names: I don't mind changing the test names, but it will be less readable when used w/ --testdox if both underscores and camel case are used. Thomas and I were looking at codeception a while back as an alternative for PHPUnit for better looking tests, maybe we can start a discussion about switching. |
… where undoing a saved pivot does nothing.
…e cut-off columns into 'Others' column.
…column if filter_sort_column is not in columns_to_display and make sure changing pivot status undoes column sort.
…an manipulate it.
…PivotByDimension filter.
…ivotted and has no subtables (eg, when flattened).
…e calling disablePivotBySubtableIfTableHasNoSubtables.
…; (use decoded entity in PHP and do not select columns using jquery selector in dataTable.js).
…o save viewdatatable params when un-pivoting.
Adding new PivotByDimension DataTable filter that can pivot a report by (almost) any dimension. refs #6078
Nice work @diosmosis 💯 |
Pull request for #6078.
Adds a new DataTable filter that can be invoked via query parameters. Filter allows pivoting a report by another dimension.
In the UI, feature can be accessed through cog option 'Pivot by subtable'.
Includes non-pivot related changes:
Known limitations:
Notes on tests:
Includes unit & integration tests. I did only some manual tests, too tired right now to do more.
UI tests will be added later.