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, showColumns, hideColumns should work if API returns arrays #5896

Closed
tsteur opened this issue Jul 30, 2014 · 2 comments
Closed

filter, showColumns, hideColumns should work if API returns arrays #5896

tsteur opened this issue Jul 30, 2014 · 2 comments
Assignees
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical.
Milestone

Comments

@tsteur
Copy link
Member

tsteur commented Jul 30, 2014

See for instance http://demo.piwik.org/?module=API&method=SegmentEditor.getAll&idSite=7&format=JSON&token_auth=anonymous&filter_limit=1&showColumns=name,definition

Parameters are simply ignored. ResponseBuilder is supposed to convert a returned array to a DataTable so those filters apply but it doesn't.

This is important for matomo-org/matomo-mobile-2#3243

@tsteur tsteur added this to the Piwik 2.5.0 milestone Jul 30, 2014
tsteur added a commit that referenced this issue Aug 1, 2014
…would work. wondering if it fails any test
@mattab mattab removed the c: Core label Aug 3, 2014
@mattab mattab added this to the Piwik 2.5.0 milestone Aug 3, 2014
tsteur added a commit that referenced this issue Aug 6, 2014
…would work. wondering if it fails any test
tsteur added a commit that referenced this issue Aug 6, 2014
…her classes which also allows plugins to define their own render formats
tsteur added a commit that referenced this issue Aug 6, 2014
tsteur added a commit that referenced this issue Aug 6, 2014
…ently not supposed to render anything. This should fix many tests
tsteur added a commit that referenced this issue Aug 6, 2014
tsteur added a commit that referenced this issue Aug 6, 2014
…with a multi dim array we should actually use the datatable renderer the php way and not the apiRenderer way
tsteur added a commit that referenced this issue Aug 6, 2014
…un the filters on it will not work. Instead run the filters directly on the array. Therefore, to not have duplicated code the dataTable and row can be now treated as an array and we access them like an array in the ColumnDelete filter which will be for now the only filter is applied on arrays
tsteur added a commit that referenced this issue Aug 6, 2014
tsteur added a commit that referenced this issue Aug 6, 2014
tsteur added a commit that referenced this issue Aug 6, 2014
tsteur added a commit that referenced this issue Aug 6, 2014
…ourse they would fail but I want to compare it with another branch
tsteur added a commit that referenced this issue Aug 7, 2014
@tsteur tsteur self-assigned this Aug 7, 2014
@tsteur
Copy link
Member Author

tsteur commented Aug 7, 2014

showColumns and hideColumns filter work now for indexed arrays that have associative arrays

For example

array(array('nb_visits' => 1, 'nb_hits' => 2), array('nb_visits' => 2, 'nb_hits' => 4))

@tsteur tsteur closed this as completed Aug 7, 2014
@mattab
Copy link
Member

mattab commented Aug 7, 2014

👍

tsteur added a commit that referenced this issue Aug 14, 2014
… filter_offset on arrays. would be useful for Piwik Mobile
tsteur added a commit that referenced this issue Aug 15, 2014
refs #5896 filter_limit and filter_offset support for indexed arrays
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical.
Projects
None yet
Development

No branches or pull requests

2 participants