Feature #2681

Work on search engine criteria order : permit to create tree criteria request

Added by moyo over 8 years ago. Updated over 6 years ago.

Status:NewStart date:03/22/2011
Priority:NormalDue 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

Criteria.tar.gz (1.57 KB) abdoral, 07/19/2011 07:48 PM

glpi_searchform_proposal.png (12.7 KB) orthagh, 06/24/2013 10:00 AM

History

#1 Updated by abdoral over 8 years ago

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 about 8 years ago

  • Target version changed from 0.83 to Candidate for next major version

#3 Updated by orthagh over 6 years ago

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.

Also available in: Atom PDF