[MSHOP-79] Product List Order displayed in a component is not the same as the one in the JCR Created: 04/Jun/13  Updated: 09/Jul/13  Resolved: 18/Jun/13

Status: Closed
Project: Magnolia Shop (closed)
Component/s: None
Affects Version/s: 1.1.1
Fix Version/s: 1.1.3

Type: Bug Priority: Neutral
Reporter: Adrien Berthou Assignee: Jaroslav Simak
Resolution: Fixed Votes: 0
Labels: shop
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File AccessProductByCategoryInJcrOrderFix.java    
Issue Links:
relation
is related to MSHOP-75 Product list changes order each time ... Closed
Template:
Patch included:
Yes
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:

 Description   

Product List Order displayed in a component is not the same as the one in the JCR browser.

This seems to come from class "ShopProductAccesor". An SQL query is used to retrieve the products:
String query = "select * from [mgnl:contentNode] as productsSubNode where ISDESCENDANTNODE('" + ShopUtil.getPath("shopProducts", shopName) + "') and contains(productsSubNode.*, '" + productCategory + "')";

This query does NOT return the list of products in the same order as the one displayed in the JCR browser.

Note: Not sure if using SQL queries ever works to display get data in the order it is displayed in the JCR. I could not find anything about it.



 Comments   
Comment by Adrien Berthou [ 04/Jun/13 ]

This is related to MSHOP-75, however this other ticket seems to have "only" fixed the fact that now the order keeps being the same after refresh. But still, it is not the same as the one in the JCR.

Comment by Will Scheidegger [ 04/Jun/13 ]

Hi Jan

I think Teresa implemented that Accessor class with the SQL2 query. However last time Sämi told me to assign stuff that I cannot take care of to you and you would then reassign it to the right person. Is that o.k.?

Thanks!
-will

Comment by Roman Kovařík [ 05/Jun/13 ]

Hi Will,
we are used to set Unassigned before someone pick the issue and fix version to the next (1.1.3) to make sure someone will take care about it.

Best regards
Roman

Comment by Adrien Berthou [ 06/Jun/13 ]

Please see fix attached "AccessProductByCategoryInJcrOrderFix.java"

Comment by Adrien Berthou [ 14/Jun/13 ]

You may want to look at this thread regarding the SQL2 query's result order http://forum.magnolia-cms.com/forum/thread.html?threadId=9e6cbfa9-453e-478f-a640-b532d130ca35&page=1

Comment by Jaroslav Simak [ 14/Jun/13 ]

Hi, thanks, i'll check that.

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