glpi-project / glpi

GLPI is a Free Asset and IT Management Software package, Data center management, ITIL Service Desk, licenses tracking and software auditing.
https://glpi-project.org
GNU General Public License v3.0
4.33k stars 1.3k forks source link

Some ticket rules are not working when ticket is collected by mail while it works by interface #18368

Open SteadEXE opened 1 day ago

SteadEXE commented 1 day ago

Code of Conduct

Is there an existing issue for this?

Version

10.0.17

Bug description

We got an issue, we got a set of rules to extract ticket category from subject by using a regex. Then we got a set of rules to assign a technician based on the previously extracted category. To finish we got a set of rules to assign SLA based on the category and the priority or type of the ticket.

All rules are in "add/update" mode.

When we use the rule tester, all rules are evaluated and we end up with the result we want. When we create a ticket directly from GLPI it works.

But when a ticket is created by the mailgate some rules are not evaluated.

After troubleshooting it, it looks like the ticket type is not available when creating a ticket from mailgate while evualuating rules the first time. If we manually set it in the first matching rule it works.

Relevant log output

Page URL

No response

Steps To reproduce

  1. Create a rule to extract category from title with 'add/update'
  2. Create a rule to set SLA based on ticket based on category and ticket type.

If you manually set a type in the rule 1 it works otherwise it doesn't.

Your GLPI setup information

No response

Anything else?

No response

cedric-anne commented 1 day ago

Hi,

Indeed, the mail collector does not set a type, and IMHO, it should not do it automatically. We could probably propose a new rule dedicated to mail collectors that would permit to define the type of the ticket.

SteadEXE commented 1 day ago

Yeah it makes sense, yeah I think it could be great to make both workflows identical, thank you for the quick reply.

By the way, thank you for the fast reply, as usual, you guys rocks