Bug #15991
closedSearch filters (eg: last_report < "30 minutes ago" ) not working as expected
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1332311
Description of problem:
Filters showing wrong results.
Satellite UI -> Hosts -> All Hosts -> last_report > "30 minutes ago" -> This will show results for the system < 30 min.
Satellite UI -> Hosts -> All Hosts -> last_report < "30 minutes ago" -> This will show results for the system > 30 min.
Same happens with Satellite Monitor -> Reports [ reported > "30 minutes ago" and reported < "30 minutes ago"]
Version-Release number of selected component (if applicable):
Satellite 6.1.8
How reproducible:
Steps to Reproduce:
Mentioned in the description of problem.
Actual results:
Wrong results
Expected results:
Correct filter results.
Additional info:
Files
Updated by Ondřej Pražák over 7 years ago
- Category set to Reporting
- Target version set to 115
Updated by Dominic Cleal over 7 years ago
- Subject changed from Search filters (eg: last_report < "30 minutes ago" ) not working as expected on satellite 6 UI to Search filters (eg: last_report < "30 minutes ago" ) not working as expected
- Category changed from Reporting to Search
- Status changed from New to Need more information
This is documented so appears to be working as expected - you should file this against scoped_search, not Foreman (https://theforeman.org/manuals/1.12/index.html#4.1.5Searching).
Updated by Marek Hulán over 7 years ago
Ondřej, were you able to reproduce the issue? And in such case, could you please add versions of scoped_search and foreman?
Updated by Ondřej Pražák over 7 years ago
- File last_report.png last_report.png added
I was able to reproduce with 1.13-develop, scoped search 3.2.2
Updated by Dominic Cleal over 7 years ago
That appears to match the documentation - the date of the last_report is greater than the date 13 days ago. Relative dates are parsed first as if they were entered as absolute dates, without changing the meaning of the operators. A change to this logic would have to be made in the scoped_search project, not Foreman.
Updated by Marek Hulán over 7 years ago
- Status changed from Need more information to Rejected
I lean towards saying this is not a bug. The ">" operator means is later so last report is later than 13 days ago. I don't think changing the operator meaning for relative dates would make this easier to understand.