Bug #15991

Search filters (eg: last_report < "30 minutes ago" ) not working as expected

Added by Ondřej Pražák over 1 year ago. Updated about 1 year ago.

Status:Rejected
Priority:Normal
Assigned To:-
Category:Search
Target version:Team Marek backlog
Difficulty: Bugzilla link:1332311
Found in release: Pull request:
Story points-
Velocity based estimate-

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:

last_report.png (15.2 KB) Preview Ondřej Pražák, 08/09/2016 03:14 AM

Last_report

History

#1 Updated by Ondřej Pražák over 1 year ago

  • Category set to Reporting
  • Target version set to Team Marek backlog

#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).

#3 Updated by Marek Hulán over 1 year ago

Ondřej, were you able to reproduce the issue? And in such case, could you please add versions of scoped_search and foreman?

#4 Updated by Ondřej Pražák over 1 year ago

I was able to reproduce with 1.13-develop, scoped search 3.2.2

#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 about 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.

Also available in: Atom PDF