Re: [Proposal] OR search criteria within performFind

2018-02-07 Thread Scott Gray
A little bit off topic but I recently wrote an EntityCondition converter for use with the rsql-parser[1] library. Using it on an html client to write free-form queries would need some javascript wizardry but it's worth looking at if we ever wanted to implement something like Jira's JQL

Re: [Proposal] OR search criteria within performFind

2018-02-07 Thread Taher Alkhateeb
Awesome Gil, you rock! Rubbing hands in anticipation :) On Feb 7, 2018 1:52 PM, "gil portenseigne" wrote: After reanalysing the performFind mechanism, i realized that i was mistaken and just write down the logic you proposed, i will make it available for review,

Re: [Proposal] OR search criteria within performFind

2018-02-07 Thread gil portenseigne
After reanalysing the performFind mechanism, i realized that i was mistaken and just write down the logic you proposed, i will make it available for review, with I hope a little test, when i'll find the time. Just letting you know i am on it :). Gil On 03/02/2018 10:17, Taher Alkhateeb

Re: [Proposal] OR search criteria within performFind

2018-02-03 Thread Taher Alkhateeb
Hi Gil, inline ... On Feb 2, 2018 6:55 PM, "gil portenseigne" wrote: Ok then I see the limitation of my implementation ! I can't solve your example... But the existing default behaviour in performFind is "AND"ed every conditions (that is the more common way to

Re: [Proposal] OR search criteria within performFind

2018-02-02 Thread gil portenseigne
Ok then I see the limitation of my implementation ! I can't solve your example... But the existing default behaviour in performFind is "AND"ed every conditions (that is the more common way to search something in my opinion, each user input restrain the result). That make this design

Re: [Proposal] OR search criteria within performFind

2018-02-02 Thread Taher Alkhateeb
May I try to share a design that might be a bit more generic? Here is one idea: Then we change the find services so that each group "AND" its members and the groups are "OR"ed together. So in this example the find service would have the condition: (field1 AND field2) OR (field3 AND field4)

Re: [Proposal] OR search criteria within performFind

2018-02-02 Thread gil portenseigne
I'll try to improve xml widget integration adding a field like : WDYT ? On 02/02/2018 14:16, gil portenseigne wrote: In a widget form to "OR" a condition between x fields you have to : You'll get EntityCondition.makeCondition(     UtilMisc.toList(field1Condition,

Re: [Proposal] OR search criteria within performFind

2018-02-02 Thread gil portenseigne
In a widget form to "OR" a condition between x fields you have to : You'll get EntityCondition.makeCondition(     UtilMisc.toList(field1Condition, field2Condition, field3Condition), EntityOperator.OR) EntityCondition.makeCondition(     UtilMisc.toList(field4Condition,

Re: [Proposal] OR search criteria within performFind

2018-02-02 Thread Taher Alkhateeb
Oh okay I understand. Well .. in that case how do you "OR" conditions in the form? Do you do it selectively or do you want all "OR" or all "AND"? On Feb 2, 2018 1:26 PM, "gil portenseigne" wrote: > Inline > > > On 02/02/2018 11:04, Taher Alkhateeb wrote: > >> So

Re: [Proposal] OR search criteria within performFind

2018-02-02 Thread gil portenseigne
Inline On 02/02/2018 11:04, Taher Alkhateeb wrote: So it's not some SQL union but rather just a simple "OR" instead of "AND" for some conditions. Yes it's that simple, but between different fields. I was actually thinking of this problem recently but not only for two options but rather

Re: [Proposal] OR search criteria within performFind

2018-02-02 Thread Taher Alkhateeb
So it's not some SQL union but rather just a simple "OR" instead of "AND" for some conditions. I was actually thinking of this problem recently but not only for two options but rather multiple options. To be more specific, our drop-down form widgets have an attribute "allow-multiple" or

Re: [Proposal] OR search criteria within performFind

2018-02-02 Thread gil portenseigne
Yes, actually using form widget with performFind services do not offer a way to union two search criteria. Exemple : i want to find all communicationEvent that are in Bounced status *or* that contains something in note field. (very specific, strange, thats why) By default all search

Re: [Proposal ]OR search criteria within performFind

2018-02-01 Thread Taher Alkhateeb
Hi, perhaps if you share the idea of how to translate it to the entity engine conditions then we'd be better informed? On Feb 1, 2018 6:30 PM, "gil portenseigne" wrote: > Hello, > > In a customer project we met a very specific need in a search screen that > offer

[Proposal ]OR search criteria within performFind

2018-02-01 Thread gil portenseigne
Hello, In a customer project we met a very specific need in a search screen that offer search criteria that must unions and not intersect. I propose this improvement in OFBIZ-10195, https://s.apache.org/sjW1 but i'm wondering if any of you ever met such need ? Is that worth to be commited