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

Can't find computers having 2 softwares #16919

Open
2 tasks done
FrenchHope opened this issue Apr 10, 2024 · 2 comments
Open
2 tasks done

Can't find computers having 2 softwares #16919

FrenchHope opened this issue Apr 10, 2024 · 2 comments

Comments

@FrenchHope
Copy link

FrenchHope commented Apr 10, 2024

Code of Conduct

  • I agree to follow this project's Code of Conduct

Is there an existing issue for this?

  • I have searched the existing issues

Version

GLPI 10.0.14

Bug description

I can't find computers having 2 software like Firefox AND Chrome with global rules on software name.
There is no result.
It seems to work for a query like Firefox OR Chrome.

Relevant log output

No response

Page URL

No response

Steps To reproduce

Go to computers,
create 2 global rules criteria search on software : name
One with software 1
The other with software 2
using AND operator

Your GLPI setup information

No response

Anything else?

No response

@keguira
Copy link

keguira commented Apr 11, 2024

Did some tests.

UC1 : your use-case

  • 'Software' 'Characteristics - Name' 'contains' 'firefox'
  • AND 'Software' 'Characteristics - Name' 'contains' 'chrome'

Returns : nothing

UC2 : your second use-case with OR

  • 'Software' 'Characteristics - Name' 'contains' 'firefox'
  • OR 'Software' 'Characteristics - Name' 'contains' 'chrome'

Returns : computers with one or the other or both

UC3 : trying to figure the AND behavior

  • 'Software' 'Characteristics - Name' 'contains' 'firefox'
  • AND 'Software' 'Characteristics - Name' 'contains' 'ESR'

Returns : computers with any variation of firefox ESR

The search query aggregate the search query for a same entry.
Also confirmed by another test where I use an other attribute of the software (editor or version).

UC4 : trying to confirm assertion made in UC3 with the AND NOT behavior

  • 'Software' 'Characteristics - Name' 'contains' 'firefox'
  • AND NOT 'Software' 'Characteristics - Name' 'contains' 'chrome'

Returns : computers with firefox. Does not exclude computers having chrome

UC5 : trying to use the grouping system to force to look for multiple software entries on same computer

  • Group
    • 'Software' 'Characteristics - Name' 'contains' 'firefox'
  • AND Group
    • 'Software' 'Characteristics - Name' 'contains' 'chrome'

Returns : nothing.

@FrenchHope
Copy link
Author

FrenchHope commented Apr 12, 2024

Thanks. I tried grouping system too, without success.
Even with SQL I had to use an IN operator. AND didn't work.

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

No branches or pull requests

2 participants