[MGNLREST-170] Filtering by date does not return anything Created: 09/Feb/18 Updated: 03/Dec/20 Resolved: 09/Mar/18 |
|
| Status: | Closed |
| Project: | Magnolia REST Framework |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.1 |
| Type: | Bug | Priority: | Neutral |
| Reporter: | Dai Ha | Assignee: | Saimir Gasa |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | 3h | ||
| Time Spent: | 2.5d | ||
| Original Estimate: | Not Specified | ||
| Template: |
|
| Acceptance criteria: |
Empty
|
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
| Date of First Response: | |
| Sprint: | Saigon 135, Saigon 136, Saigon 137 |
| Story Points: | 5 |
| Description |
|
Issue: User queries and filters with a specific date (not contains time part). There are records match that date but empty result returned. Sample request: |
| Comments |
| Comment by Hieu Nguyen Duc [ 21/Feb/18 ] |
|
I think this is not a bug. It's working deliberately because filtering by "date[ eq ]=2015-01-29" semantically doesn't mean selecting data in that date. The used operator is EQUAL which compares a dateTime with a date. They are not equal of course. If you want to filter by date, you should use IN operator with range symbol (~).
http://<host>/.rest/<endpointPath>?mgnl:created[in]=2018-01-11T00:00:00.000%2B07:00~2018-01-11T23:59:59.999%2B07:00
What do you guys think? |
| Comment by Oanh Thai Hoang [ 09/Mar/18 ] |
|
While doing QA, I encountered this issue, I created a follow-up ticketĀ |