Bug 1631812

Summary: Searching by user with ~ is not properly handled.
Product: Red Hat Satellite Reporter: Perry Gagne <pgagne>
Component: Tasks PluginAssignee: Adam Ruzicka <aruzicka>
Status: CLOSED ERRATA QA Contact: Peter Ondrejka <pondrejk>
Severity: medium Docs Contact:
Priority: high    
Version: 6.4CC: aruzicka, bkearney, egolov, inecas, pdragun
Target Milestone: 6.7.0Keywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: tfm-rubygem-foreman-tasks-0.17.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-04-14 13:23:24 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:
Bug Depends On:    
Bug Blocks: 1468388    

Description Perry Gagne 2018-09-21 15:37:01 UTC
Description of problem:

While testing bz 1468388 i noticed that the ~ operator is not handled properly 


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


How reproducible: Always


Steps to Reproduce:
1. Create multiple users (eng-user1, eng-user2, bob, sam)
2. Perform some tasks with each of the users. 
3. Monitor -> Tasks. 
4. Search user ~ eng

Actual results: 
Empty search results 


Expected results: 
Tasks run by users with "eng" anywhere in their user name are returned. See docs [1] "... If no wildcard is specified, the string is treated as if surrounded by wildcards: %rhel7%"


Additional info:
The workaround here is to add wildcards to the search like:
user ~ eng-*

This could be an issue for customer who use usernames that contain other information they wish to search on, other then a literal username. For example all service accounts may be prefixed by "serv-servname-".

Comment 2 Adam Ruzicka 2018-09-24 08:44:15 UTC
Created redmine issue http://projects.theforeman.org/issues/25017 from this bug

Comment 3 pm-sat@redhat.com 2018-09-24 10:03:39 UTC
Upstream bug assigned to aruzicka@redhat.com

Comment 4 pm-sat@redhat.com 2018-09-24 10:03:42 UTC
Upstream bug assigned to aruzicka@redhat.com

Comment 6 Bryan Kearney 2019-09-10 12:03:19 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/25017 has been resolved.

Comment 10 Perry Gagne 2019-12-03 16:56:25 UTC
FailedQA in Sat 6.7 snap 4 same reason as bz 1468388

Comment 12 Peter Ondrejka 2020-01-20 13:50:08 UTC
Verified on Sat 6.7 snap 9

Comment 15 errata-xmlrpc 2020-04-14 13:23:24 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, 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-2020:1454