-
Notifications
You must be signed in to change notification settings - Fork 479
Closed
Labels
MergedQA : PassedRelease : 21.06.13Included in LTS patch release 21.06.13Included in LTS patch release 21.06.13Release : 22.03.5Included in LTS patch release 22.03.5Included in LTS patch release 22.03.5Release : 22.06Team : ScoutType : Defect
Description
Describe the bug
The $dotcontent.pullRelatedField() method is not returning the related content in the same order that the related content was added when the sort parameter is not used.
To Reproduce
Steps to reproduce the behavior:
- Create 4 contents of the Content-Type Blog Comments (c1, c2, c3, c4).
- Create a blog and relate the 4 comments.
- Reorder the comments (c4,c1,c2,c3)
- Create a Code Snippet Widget with the code:
#set($id = "ID OF THE CREATED BLOG")
#set($comments = $dotcontent.pullRelatedField($id,"Blog.blogComment", "+languageId:1", 3, ""))
<h3>Comments</h3>
#foreach($comment in $comments)
<div>
Blog comment: $comment.title
</div>
#end
- Create a page and add the created widget.
- Check the order of the comments, should be the same as the one of the content (c4, c1, c2). But is showing (c4,c2,c3).
Expected behavior
When no sort parameter is specified, the $dotcontent.pullRelatedField() method should return the related content in the same order that the related content was added.
Screenshots
ORDER BY MOD DATE

ORDER AT THE CONTENT

ORDER SHOWING IN THE PAGE

Additional context
Customer Ticket: https://dotcms.zendesk.com/agent/tickets/106898
Reproducible in demo (22.03)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
MergedQA : PassedRelease : 21.06.13Included in LTS patch release 21.06.13Included in LTS patch release 21.06.13Release : 22.03.5Included in LTS patch release 22.03.5Included in LTS patch release 22.03.5Release : 22.06Team : ScoutType : Defect