[plone.app.querystring] Collection not filtering integer field

classic Classic list List threaded Threaded
5 messages Options
Rodrigo Ferreira de Souza Rodrigo Ferreira de Souza
Reply | Threaded
Open this post in threaded view
|

[plone.app.querystring] Collection not filtering integer field

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:

* plone.app.querystring.queryparser._equal
* plone.app.querystring.queryparser._lessThan
* plone.app.querystring.queryparser._largerThan

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)

Can someone confirm this as a bug? Thanks
hvelarde hvelarde
Reply | Threaded
Open this post in threaded view
|

Re: [plone.app.querystring] Collection not filtering integer field

I can confirm this is a bug in both 1.2.x branch (Plone 4.3) and master
(Plone 5.0) branch.

can someone from the framework team review it and merge it?

https://github.com/plone/plone.app.querystring/pull/33

Rodrigo, we need this on 1.2.x branch also; please make another pull
request for that.

I need a release for the 1.2.x branch also, I can do it if you give me
permissions.

best regards

Héctor Velarde



------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers

smime.p7s (5K) Download Attachment
Rodrigo Ferreira de Souza Rodrigo Ferreira de Souza
Reply | Threaded
Open this post in threaded view
|

Re: [plone.app.querystring] Collection not filtering integer field

Hi Héctor,

There are no 1.2.x branch at p.a.querystring

Since now thanks,
Rodrigo Ferreira de Souza

python -c "n='H+6(13+zT5((51(9z65zG+% 9';s=len(n)-1;i=list(range(s+1))[::-1]+list(range(1,s+1));print('\n'.join([' '.join([chr(154-ord(n[(x if x > y else y)])) for y in i]) for x in i]))"


On Mon, Apr 27, 2015 at 9:09 AM, Héctor Velarde <[hidden email]> wrote:
I can confirm this is a bug in both 1.2.x branch (Plone 4.3) and master (Plone 5.0) branch.

can someone from the framework team review it and merge it?

https://github.com/plone/plone.app.querystring/pull/33

Rodrigo, we need this on 1.2.x branch also; please make another pull request for that.

I need a release for the 1.2.x branch also, I can do it if you give me permissions.

best regards

Héctor Velarde



------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers



------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
hvelarde hvelarde
Reply | Threaded
Open this post in threaded view
|

Re: [plone.app.querystring] Collection not filtering integer field

On 27-04-2015 09:40, Rodrigo Ferreira de Souza wrote:
> There are no 1.2.x branch at p.a.querystring

HV> Timo, could you please tell me on which commit we should add a 1.2.x
branch for maintenance?

https://github.com/plone/plone.app.querystring/commits/master

is this one?

https://github.com/plone/plone.app.querystring/commit/777da1f383aa6d1f526611a1acc011ea40da7f50

BTW, why we added a new minor version here?


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers

smime.p7s (5K) Download Attachment
Timo Stollenwerk-2 Timo Stollenwerk-2
Reply | Threaded
Open this post in threaded view
|

Re: [plone.app.querystring] Collection not filtering integer field

Am 27.04.2015 um 14:59 schrieb Héctor Velarde:

> On 27-04-2015 09:40, Rodrigo Ferreira de Souza wrote:
>> There are no 1.2.x branch at p.a.querystring
>
> HV> Timo, could you please tell me on which commit we should add a 1.2.x
> branch for maintenance?
>
> https://github.com/plone/plone.app.querystring/commits/master
>
> is this one?
>
> https://github.com/plone/plone.app.querystring/commit/777da1f383aa6d1f526611a1acc011ea40da7f50
>
>
> BTW, why we added a new minor version here?

Because we added a few new settings that require a gs upgrade step.

https://github.com/plone/plone.app.querystring/commit/cbab10b8e21fcc50da3a8b17da514a8629701a1c

It is up to Eric to decide if that new version will go into the 4.3.x
branch I guess.

Cheers,
Timo

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers