Description of problem:
After creating SCAP policy with a number or name pattern and running the scan on the same and even on different client systems the compliance report does not show up if multiple policies is selected.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Simple setup of scap on satellite and on client system.
2. Make policies with names such as
a. 2019 New
b. 2019 New1
c. 2019 New2
d. 2019 standard New1
3. Apply the scan and run the scan on one single host or on different hosts.
4. After reports get uploaded search with below search options.
 last_for = host and policy ~ "2019" No result
 last_for = host and policy = "2019 New" and policy = "2019 New1" No result
 policy = "2019 New" and policy = "2019 New1" No result
No report comes up.
Reports associated with the profiles should show up.
Report always belongs to one policy and there can never be a report that has more that one policy. Because of that, condition 'policy = "2019 New" and policy = "2019 New1"' will always be false, so the examples  and  return correctly no results. Maybe the search meant to be 'policy = "2019 New" or policy = "2019 New1"'?
There is a bug in '~' operator, so example  returns incorrectly no results. Searching by exact match worked for me: 'last_for = host and policy ="2019 New"'
Created redmine issue http://projects.theforeman.org/issues/26001 from this bug
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/26001 has been resolved.
Build: Satellite 6.7 snap7
The issue with ~ is fixed and now we can see search results for it on Compliance reports page
Created attachment 1648786 [details]
Search Results with ~
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.