Improve Search Options of IT Assets - Improvement #2 - Add associative property explicitly
This idea suppose this another one Improve Search Options of IT Assets - Improvement #1 - Add denial of first conditional have been taken into account.
We all know that it is impossible to make certain queries with GLPI today. One of these queries could be the following
P11: Computers with processor Intel(R) Core(TM) i5 P12: Computers with operating system Microsoft Windows XP P13: Computers with processor Intel(R) Core(TM) i3 P14: Computers with processor system Microsoft Windows 7 Q11: ( P11 * P12) + ( P13 * P14)
and this question is impossible to make because Search Options doesn't allow to associate logic operator explicitly. That happens when we try to do something like that.
Example #1
We could think that A + B give us a set of 1584 computers but this is that happens
There are more examples of impossible queries but only one of them is enough to show them exists.
There are other situations where the queries are possible but they are tedious and difficult of build because you must to know Boole algebra. The following is an example of that.
P21: Computers with processor Intel(R) Core(TM) i5 P22: Computers with operating system Microsoft Windows XP P23: Computers with processor system Microsoft Windows 7 Q21: P21 * !(P22 + P23)
This question is impossible to make for the same reason as before; Search Options doesn't allow to associate logic operator explicitly. That happens when we try to do something like that.
Example #2
We know that Q21 is a set of 123 computers but how can we do the query. unlike the previous situation we can transform Q21 into this equivalent query: P21 * !P22 * !P23.
And this is the current state of Search Options, although there are also situations where logical operators are associated in a capricious way giving curious results. :/
To resolve these problems I suggest the following:
This new operator '>', and its opposing party '<', will manage the associative search criterion in a explicit way. This is the idea:
This approach would allow two new features:
- Associate logical operators
- Create nested conditionals up to a fixed level
These would be the solutions to Example #1 and Example #2 with this new approach.
Example #1
Example #2
Simple, isn't it? ;)
Regards,
Customer support service by UserEcho
Sorry, there was an error in the solution for Example #2. This is the solution fixed; note the 'AND NOT (' instead of 'AND ('.
Regards,
I have thought it would be better whether the non global search operators were grouped together. This is the result.
Regards,
Please, see also Improve Search Options of IT Assets - Improvement #3 - Simplify and extend global searches.
Regards,
Work currently in progress
Hello glpi,
Thank you for have heeded my suggestion. It was great news for me.
Best regards,
Done in 9.4