[MGNLDEMO-261] Tours durations are stored as String properties Created: 03/Jan/18  Updated: 29/Mar/18  Resolved: 27/Mar/18

Status: Closed
Project: Magnolia Demo Projects
Component/s: tours-app
Affects Version/s: None
Fix Version/s: 1.2.3

Type: Bug Priority: Major
Reporter: Mikaël Geljić Assignee: Robert Šiška
Resolution: Fixed Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Relates
dependency
is depended upon by MGNLDEMO-273 Include the tourfinder demo via the m... Closed
relation
is related to MGNLREST-150 Filtering doesn't work when parameter... Closed
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: Kromeriz 140
Story Points: 2

 Description   

The duration property is stored as a String in JCR, so comparing it to other values results in unexpected behaviors. In REST Content Delivery, filters and operators expose the same behavior.

Go to JCR tools app and select the tours workspace.

A:

select * from [mgnl:content] where duration > 22

All 36 tours are returned, whereas none of them has a duration exceeding 21 (possible values are 2, 7, 14 and 21). Possibly, constraint between non-matching types may be ignored by Jackrabbit (any long value prompts all results).

B:

select * from [mgnl:content] where duration > "6"

Only tours with duration equal to 7 (not 14 nor 21) are returned, because string comparison is done lexicographically.



 Comments   
Comment by Robert Šiška [ 16/Mar/18 ]

Raising to major, as it limits functionality of tour-finder module (filtering by duration).

Generated at Mon Feb 12 05:17:54 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.