Skip to content

Conversation

@RomainLvr
Copy link
Contributor

@RomainLvr RomainLvr commented May 26, 2025

Checklist before requesting a review

Please delete options that are not relevant.

  • I have read the CONTRIBUTING document.
  • I have performed a self-review of my code.
  • I have added tests that prove my fix is effective or that my feature works.
  • This change requires a documentation update.

Description

  • It fixes !37861
  • Here is a brief description of what this PR does

Fixed execution of rules using ticket title. These rules were not validated if the user did not modify the ticket title.

To correct this, simply add the ticket name field to the input in the fillInputForBusinessRules() function.

Screenshots (if appropriate):

image

@RomainLvr RomainLvr self-assigned this May 26, 2025
@RomainLvr RomainLvr requested review from Rom1-B and stonebuzz May 26, 2025 09:42
@stonebuzz
Copy link
Contributor

stonebuzz commented May 27, 2025

Please note that in the upcoming major release of GLPI (version 11), it will be possible to configure multiple approval steps.

#19069

Now, I fully agree that in the interface, it is indeed possible to trigger a new approval request once a validation has been completed—whether approved or rejected—even though the business rules do not allow it.

what do you think @cedric-anne @orthagh

@cedric-anne
Copy link
Member

Now, I fully agree that in the interface, it is indeed possible to trigger a new approval request once a validation has been completed—whether approved or rejected—even though the business rules do not allow it.

what do you think @cedric-anne @orthagh

It does not make sense to ask the same user for a new validation of the same ticket as long as there is no support of multiple validations in GLP 10. IMHO, the fact that it is possible to create multiple validations requests for the same user for a same ticket is a bug. We should not change this behaviour in GLPI 10.

@RomainLvr RomainLvr changed the title Fix (Business Rule) - Add a validation after another has been validated Fix (Business Rule) - Ticket Name Rule execution May 28, 2025
@RomainLvr RomainLvr requested a review from Rom1-B May 28, 2025 09:06
@RomainLvr
Copy link
Contributor Author

ping @stonebuzz

@Rom1-B Rom1-B requested review from cedric-anne and trasher June 5, 2025 06:51
Copy link
Member

@cedric-anne cedric-anne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already had many discussions about this topic. Nos having all the fields in the rules engine input is a known limitation and, unless we find a way to handle it without changing the behaviour of the existing rules, we should not change it.

I am not sure it is a good idea to force this field value in the rules input, especially in a bugfixes version.

@cconard96
Copy link
Contributor

We already had many discussions about this topic. Nos having all the fields in the rules engine input is a known limitation and, unless we find a way to handle it without changing the behaviour of the existing rules, we should not change it.

I am not sure it is a good idea to force this field value in the rules input, especially in a bugfixes version.

My opinion is that historically, the rules engine always worked with the changeset, not previous or current values, so it should stay that way. Focus should instead be on a more advanced automation solution either as a direct replacement or something to use alongside the rules engine.

@RomainLvr RomainLvr closed this Jun 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants