Skip to content
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

filter_sort_column not working with date=last30 #12382

Open
darrendiscovr opened this issue Dec 21, 2017 · 1 comment
Open

filter_sort_column not working with date=last30 #12382

darrendiscovr opened this issue Dec 21, 2017 · 1 comment

Comments

@darrendiscovr
Copy link

There seems to be a problem using filter_sort_column as it doesn’t work with date=last30.
https://demo.piwik.org/?module=API&method=VisitsSummary.get&idSite=7&period=month&date=last30&format=html&token_auth=anonymous&filter_sort_column=nb_visits&filter_sort_order=desc

Could there be a solution to this that I am missing from the API documentation?

@tsteur
Copy link
Member

tsteur commented Dec 21, 2017

Hi, it is expected that the reports are listed by date. Here the report has no dimension (only main metrics). A report with dimension is sorted but does sort each dataTable within a date... https://demo.piwik.org/?module=API&method=Actions.getPageUrls&idSite=7&period=month&date=last30&format=json&token_auth=anonymous&filter_sort_column=nb_visits&filter_sort_order=desc

So basically the sorting is applied to data of each individual day and because VisitsSummary.get has no multiple rows, there is nothing sorted.

Applying the sort filter to the dates for reports without a dimension won't be a solution since we need consistent sorting behaviour for reports with and without a dimension. It would be a new feature to make this sortable and would need a new API parameter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants