[MGNLUI-6725] Provide sort by node name in jcrDatasource definition Created: 02/Jun/21  Updated: 14/Nov/21  Resolved: 09/Nov/21

Status: Closed
Project: Magnolia UI
Component/s: content app
Affects Version/s: 6.2.7
Fix Version/s: 6.2.13

Type: Improvement Priority: Neutral
Reporter: zzz_Philipp Güttler Assignee: Javier Benito
Resolution: Done Votes: 1
Labels: VN-Testing, quickwin
Remaining Estimate: Not Specified
Time Spent: 0.25d
Original Estimate: Not Specified

Attachments: Text File JcrQueryBuilder.java.patch    
Issue Links:
causality
caused by MGNLUI-3814 Allow configuration of defaultOrder i... Closed
Template:
Patch included:
Yes
Acceptance criteria:
Empty
Task DoD:
[X]* Doc/release notes changes? Comment present?
[X]* Downstream builds green?
[X]* Solution information and context easily available?
[X]* Tests
[X]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Date of First Response:
Epic Link: UI framework implementation
Story Points: 3

 Description   

In Apps, the newly added configuration sortBy in jcrDatasource does not handle the case of jcrName, where this special property is mapped to the sql statement ORDER BY NAME ASC|DESC.

This is already done in info.magnolia.ui.contentapp.JcrQueryBuilder#orderBy for sorting nodes manually, but not for the configured datasource properties. Please add the node name handling to the sortBy implementation and document it.

Then it would be possible to configure a jcrDatasource as follows.

app.yaml
datasource:
   $type: jcrDatasource
   sortBy:
      jcrName: ascending
 

Patch added.


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