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

Collection not filtering integer field #32

Closed
rodfersou opened this issue Apr 24, 2015 · 3 comments
Closed

Collection not filtering integer field #32

rodfersou opened this issue Apr 24, 2015 · 3 comments
Assignees

Comments

@rodfersou
Copy link
Member

I have an integer field and when I try to create a filter on it it didn't work.

Looking at p.a.querystring code I see that the related operators don't work:

  • plone.app.querystring.operation.int.is
  • plone.app.querystring.operation.int.lessThan
  • plone.app.querystring.operation.int.largerThan

They are mapped to these methods respectively:

And these methods don't convert the value to int (because they are used for other string based types).

Also I tested the plone.app.querystring.operation.selection.is and it fail too with an int field.

Looking at the tests of these methods, you clearly see that it is not testing every kind of data.

My suggestions are to create new methods just for int fields (doing type cast) and to add a new operator for int fields plone.app.querystring.operation.intselection.is (something like this)

@MrTango
Copy link
Contributor

MrTango commented Apr 25, 2015

Applies that for Plone 5 or 4 or both?

@hvelarde
Copy link
Member

both

@jensens
Copy link
Member

jensens commented Apr 27, 2015

closed by merging #33 and #34

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

No branches or pull requests

4 participants