You are not logged in.
I am new to this forum so I apologize if this is posted already and I was not able to find it.
We are using GLPI 0.80.4.
In the Assistance, Ticket search, you can use AND and OR several times in the search criteria.
We would like the ability to use AND and OR in the same business rule, so that we can have fewer rules. Currently we have 383 business rules setup. Can this functionality be added in a new version or do you have any ideas on how to do this?
Here is an example of our rules:
If category is “PC” AND requestor_group is “ABC” then assigned_group is “USA”
If category is “PC” AND requestor_group is “ABD” then assigned_group is “USA”
If category is “PC” AND requestor_group is “ABE” then assigned_group is “USA”
If category is “PC” AND requestor_group is “OBE” then assigned_group is “EUR”
If category is “PC” AND requestor_group is “SIN” then assigned_group is “APO”
If we could use AND and OR in the same rule, then the above 3 rules would become 1 rule.
If category is “PC” AND (requestor_group is “ABC” or requestor_group is “ABD” or requestor_group is “ABE”) then assigned_group is “USA”
Any ideas?
Offline
Not possible.
But there is a ticket on the roadmap.
Dév. Fedora 29 - PHP 5.6/7.0/7.1/7.2/7.3/7.4 - MariaDB 10.3 - GLPI master
Certifié ITILv3 - RPM pour Fedora, RHEL et CentOS sur https://blog.remirepo.net/
Offline
We encounter similar issues in the filter with several criteria in multiple fields.
We have for example the following tickets:
Ticket A : Assigned to - Group1 et Group2
Ticket B : Assigned to - Group1
Ticket C : Assigned to - Group2
With the following search:
Criteria 1 : "Statut" is "no solved"
Criteria 2 : And "Assigned to - Group" contains "Group1"
Criteria 3 : And not "Assigned to - Group" contains "Group2"
We get a wrong result with "Ticket A" and "Ticket B" while only "ticket B" should appear.
Which issue of roadmap solves this problem?
Offline
I have quite the same bug using "AND NOT" : the results are the same as with "AND".
in debug mode, looking at the sql request in the where clause i have "where criteria 1 and criteria 2" whatever the operator is set to "AND" or "AND NOT".
looks like a bug.
my criteria :
ticket date >01-02-2014
AND ticket date<01-03-2014
AND NOT closedate<01-03-2014
i expect to get all the tickets created in february and not closed in february.
here is the sql WhereClause :
WHERE `glpi_tickets`.`is_deleted` = '0' AND ( `glpi_tickets`.`entities_id` IN ('2', '3', '6', '4') ) AND ( `glpi_tickets`.`date` > '2014-02-01 00:00:00' AND `glpi_tickets`.`date` < '2014-03-01 00:00:00' AND `glpi_tickets`.`closedate` < '2014-03-01 00:00:00' )
what i need :
WHERE `glpi_tickets`.`is_deleted` = '0' AND ( `glpi_tickets`.`entities_id` IN ('2', '3', '6', '4') ) AND ( `glpi_tickets`.`date` > '2014-02-01 00:00:00' AND `glpi_tickets`.`date` < '2014-03-01 00:00:00' AND NOT `glpi_tickets`.`closedate` < '2014-03-01 00:00:00' )
Last edited by LaDenrée (2014-03-03 11:23:08)
Trouver la panne avant de réparer...
GLPI10.0.10 (ubuntu 22.04 PHP8.1 Mariadb10.6 ) plugins : comportements 2.7.2 reports 1.16.0 formcreator 2.13.8, datainjection 2.13.4 fields 1.21.6
Offline