Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1806459

Summary: Incorrect search query is formed while selecting location/organization of the host
Product: Red Hat Satellite Reporter: Anand Agrawal <aagrawal>
Component: HostsAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: tstrych
Severity: low Docs Contact:
Priority: low    
Version: 6.7.0CC: ehelms, inecas
Target Milestone: 6.10.0Keywords: Regression, Triaged
Target Release: Unused   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-11-16 14:09:07 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Anand Agrawal 2020-02-24 09:23:02 UTC
Description of problem:

If you have Organization or Location with 2 or more words like (Default Organization or Default Location). GoTo Hosts -> All Hosts -> Select/Click a host to see details. On the left-hand detail box, click Organization name (Default Organization) or Location name (Default Location). 

This will take you to the Hosts -> All Hosts page with search query but the query is incorrect so you will see no hosts.

query formed is as below
~~~
organization = Default Organization
~~~

Version-Release number of selected component (if applicable):
6.7-beta

How reproducible:
Always

Steps to Reproduce:
1. Select the host in "Default Organization" 
2. Click the host to see detail page
3. Click on the Default Organization 

Actual results:
Wrong search query formed as a result no hosts is shown.
~~~
organization = Default Organization
~~~


Expected results:
Search query should be 
~~~
organization = "Default Organization" ----> In Quotes
~~~


Additional info:
This works fine in Satellite 6.6

Comment 4 Ondřej Ezr 2021-04-22 09:02:22 UTC
Created redmine issue https://projects.theforeman.org/issues/32389 from this bug

Comment 5 Bryan Kearney 2021-05-09 16:19:02 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/32389 has been resolved.

Comment 6 tstrych 2021-06-17 09:38:10 UTC
Reproduced the problem with 6.8.4. 
I verified that it no longer exists in 6.10 snap 4. 
The query now uses quotes as requested. 
I verified with default organization, default location, and with more than one space name -> works correctly.

Verified.

Comment 9 errata-xmlrpc 2021-11-16 14:09:07 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: Satellite 6.10 Release), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2021:4702