Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tickets users added after webhook filter check #18391

Merged
merged 4 commits into from
Dec 3, 2024

Conversation

RomainLvr
Copy link
Contributor

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 !35208
  • Here is a brief description of what this PR does

In the webhook filters, when targeting ticket creations (e.g., "Technician assigned is Jon Doe"), the webhook is not triggered for a ticket that meets the valid conditions.
The issue lies in the fact that post_add elements (such as adding a user to the ticket) are processed only after the filtering criteria are evaluated to determine whether the webhook should be triggered.

Screenshots (if appropriate):

image

@RomainLvr RomainLvr requested a review from stonebuzz November 27, 2024 09:36
@cconard96
Copy link
Contributor

Maybe it should be just before or just after the call to the item_add plugin hook to also account for Infocom stuff.

@RomainLvr RomainLvr requested a review from Rom1-B November 27, 2024 09:36
@RomainLvr RomainLvr self-assigned this Nov 27, 2024
Co-authored-by: Romain B. <[email protected]>
@cedric-anne cedric-anne requested a review from Rom1-B December 2, 2024 09:29
@cedric-anne
Copy link
Member

Tests are failing, please fix them.

@cedric-anne cedric-anne merged commit 4629d98 into glpi-project:main Dec 3, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants