Bug 1001883
| Summary: | Searching datetime fields with the 'is' operator does not return expected results | ||
|---|---|---|---|
| Product: | [Retired] Beaker | Reporter: | Raymond Mancy <rmancy> |
| Component: | web UI | Assignee: | Dan Callaghan <dcallagh> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | tools-bugs <tools-bugs> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 0.14 | CC: | aigao, asaha, dcallagh, ebaak, llim, qwan, rmancy |
| Target Milestone: | 0.15 | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2013-10-03 02:29:06 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: | |
| Embargoed: | |||
This issue was fixed by the patch for bug 989902. Verified that bug is fixed in beaker-server-0.15.0-0.rc1.git.8.85dcb9c.fc18.noarch. Verification steps: - Prior to the bug being fixed, searching for 'SystemAdded' with the 'is' operator returns nothing even though there is a system with that date. - After the patch, the search works fine. Beaker 0.15 has been released. |
Description of problem: Using the searchbar and searching for things via a datetime and using the 'is' operator does not return the expected results. Version-Release number of selected component (if applicable): develop How reproducible: Always Steps to Reproduce: 1. Search for something with a datetime (i.e System/LastInventoried) 2. use the 'is' operator 3. Actual results: Nothing returned Expected results: The systems that were inventoried on that date Additional info: I replicated this problem with MariaDB 5.5.31. The problem is with comparing datetime values as strings. This is the crucial part of the query: system.date_lastcheckin >= "2013-08-28 00:00:00" AND system.date_lastcheckin <= "2013-08-29 23:59:99" Specifically, the '<=' doesn't seem to work as we expect. Replacing it with the following, fixes the problem: system.date_lastcheckin >= "2013-08-28 00:00:00" AND system.date_lastcheckin <= STR_TO_DATE('2013-08-28 23:59:59', '%Y-%m-%d %H:%i:%s')