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

search option: fix negative conditions #18978

Draft
wants to merge 2 commits into
base: 10.0/bugfixes
Choose a base branch
from

Conversation

MyvTsv
Copy link
Contributor

@MyvTsv MyvTsv commented Feb 13, 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

If I use the instruction
use_subquery' => true
in the configuration of a search option for a table storing a relationship "itemtype" and "items_id", this generates this error :

Capture d’écran du 2025-02-13 17-09-20

In the example, I try to retrieve all tickets that do not contain a tag from the tag plugin.

This PR complements this PR: pluginsGLPI/tag#230

@stonebuzz
Copy link
Contributor

Unit tests now need to be implemented.

I know that there are tests that verify the SQL query generated by GLPI (I don't remember exactly where). You should be able to rely on them to create a test that, based on search criteria, generates an SQL query that you will then need to validate.

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.

3 participants