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

Sorting in API without order #1456

Closed
sgiehl opened this issue Jul 2, 2010 · 3 comments
Closed

Sorting in API without order #1456

sgiehl opened this issue Jul 2, 2010 · 3 comments
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Milestone

Comments

@sgiehl
Copy link
Member

sgiehl commented Jul 2, 2010

It is nice, that it's adjustable to sort the API-responses as needed.
Is there a reason why filter_sort_column and filter_sort_order have both to be given in a request to get it sorted. I would expect that sorting a column without a given order behaves like any database and orders asc by default.

It's not realy a bug, but i just wondered why sorting didn't apply without filter_sort_order.

I guess it's easy to change this. Giving a default value for filter_sort_order in core/API/DataTableGenericFilter.php should fix it.
Keywords: API sorting order

@mattab
Copy link
Member

mattab commented Jul 12, 2010

sounds good, but filter_sort_order should default to 'desc' in our case

@sgiehl
Copy link
Member Author

sgiehl commented Jul 12, 2010

(In [2481]) fixes #1456 added default sorting order (desc) if filter_sort_order is not given

@mattab
Copy link
Member

mattab commented Jul 12, 2010

(In [2484]) Refs #1456

Fixing failing integration tests now that Sort filter is called by default with 'desc'.

Note: to fix integration tests, compare tests/integration/processed and tests/integration/expected/ with a file compare tool (like WinMerge on windows). If it looks good, copy processed/* files over the expected/* and tests will pass.

@sgiehl sgiehl added this to the Piwik 0.6.4 milestone Jul 8, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Projects
None yet
Development

No branches or pull requests

2 participants