Feature #2681
Work on search engine criteria order : permit to create tree criteria request
Status: | New | Start date: | 03/22/2011 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | - | % Done: | 0% | |
Category: | Search Engine | |||
Target version: | Candidate for next major version |
Description
Permit to define: B AND (A OR C) : not possible for the moment because writing : B AND A OR C
Trouble : maybe impossible to do because there are WHERE and HAVING clauses
History
#1 Updated by abdoral over 9 years ago
- File Criteria.tar.gz added
Look this solution:
TExpression - abstract class for manager expressions
TCriteria - definition of the criteria
TFilter - manager filters
For exemple:
$condition = new TCriteria();
$condition->add(new TFilter(A,'>',B));
$condition->add(new TFilter(A,'<',C),TExpression::OR_OPERATOR);
$condition->add(new TFilter(A, 'NOT IN ', array(F,G)));
echo $condition->dump();
// Result: ((A > 'B') OR (A < 'C') AND (A NOT IN ('F','G')))
I made this in addDefaultWhere() method.
moyo wrote:
Permit to define: B AND (A OR C) : not possible for the moment because writing : B AND A OR C
#2 Updated by moyo over 9 years ago
- Target version changed from 0.83 to Candidate for next major version
#3 Updated by orthagh over 7 years ago
- File glpi_searchform_proposal.png added
As described in previous teclib' meeting, one of our customers suggests to add an advanced mode.
This mode removes the AND/OR/NOT dropdowns and inserts an text input who can receive the index of lines separated by the operators.
The standard mode could be the current search form.