Processed metrics calculation refactor and removal of as much queued filter use as possible #6261
Labels
c: Platform
For Matomo platform changes that aren't impacting any of our APIs but improve the core itself.
Major
Indicates the severity or impact or benefit of an issue is much higher than normal but not critical.
Task
Indicates an issue is neither a feature nor a bug and it's purely a "technical" change.
Milestone
Processed metrics should be described as Reports/Dimensions/Segments currently are. That is there should be a class w/ metadata & related methods for each processed metric. For example,
Instead of using queued filters to calculate and format processed metrics, the list of processed metrics should be added to DataTable metadata. Then in ResponseBuilder a filter should be used to calculate all data. Then for non-'original' API renderers, a filter should be executed that formats columns.
This will avoid all future occurrences of the 'trying to add string + string' error in DataTable\Row::sumRow and will make it easier to manipulate tables since there will be less queued filters to worry about.
When finished, make sure to remove the clearQueuedFilters() call in PivotByDimension.php.
The text was updated successfully, but these errors were encountered: