You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 1, 2021. It is now read-only.
I found it impossible to filter items by number field, when I want to achieve a constraint with no limit (for example all greater than 10). The filter should look like fieldId=10-null. When I change the float to Float in NumberInterval class and pass 10 and null to it, it looks like this. But after that the API says
APIException [status=Bad Request, error=Expected value of form x-y, description=Expected value of form x-y, parameters=null]
So I tried to outwit this error by inserting a reasonably big number, like Integer.MAX_VALUE instead of the null, but it ends up with the same exception. Even if I pass a number like 1000000000, it crashes with the same error.
But the filtering in Podio allows me to do all the stuff above. Am I doing something wrong or is the filtering here not fully implemented?
Btw. I am able to propose a pull request with some changes, but I tried many things with no good result... Can you give me some hints?
Thank you,
Petr
The text was updated successfully, but these errors were encountered:
You should do "fieldId=10-" instead of " "fieldId=10-null"
It looks like the number in the request gets converted to the scientific notation (eg. -2.14748365E9). That causes the error.
BTW: Podio-java client uses an old (unsupported) method get_items. We should move away from it and use filter_items (this pull_request is actually addressing this issue - I have no time currently to look at it)
Hi Marek @mhrdev,
thank you for the hints. I have looked at it and found out that the changes in getItems() to use filter_items requires also changes in FilterBy classes, because the API expects objects, not strings... I have a partially working solution, I will maybe provide a full working pull request in the future...
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi,
I found it impossible to filter items by number field, when I want to achieve a constraint with no limit (for example all greater than 10). The filter should look like fieldId=10-null. When I change the float to Float in NumberInterval class and pass 10 and null to it, it looks like this. But after that the API says
APIException [status=Bad Request, error=Expected value of form x-y, description=Expected value of form x-y, parameters=null]
So I tried to outwit this error by inserting a reasonably big number, like Integer.MAX_VALUE instead of the null, but it ends up with the same exception. Even if I pass a number like 1000000000, it crashes with the same error.
But the filtering in Podio allows me to do all the stuff above. Am I doing something wrong or is the filtering here not fully implemented?
Btw. I am able to propose a pull request with some changes, but I tried many things with no good result... Can you give me some hints?
Thank you,
Petr
The text was updated successfully, but these errors were encountered: