Search filters (eg: last_report < "30 minutes ago" ) not working as expected
|Target version:||Team Marek backlog|
|Found in release:||Pull request:|
|Velocity based estimate||-|
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):
Steps to Reproduce:
Mentioned in the description of problem.
Correct filter results.
#2 Updated by Dominic Cleal over 1 year 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).
#5 Updated by Dominic Cleal over 1 year 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.
#6 Updated by Marek Hulán over 1 year 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.