[MGNLUI-6279] MultiValue does not persist the leading zero when using ByLexicographicallyIndexedChildNodes (0, 1 instead of 00, 01) Created: 06/Oct/20  Updated: 12/Oct/20  Resolved: 07/Oct/20

Status: Closed
Project: Magnolia UI
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Šimon Demočko Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: 50m
Original Estimate: Not Specified

Attachments: File form.yaml    
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
Documentation update required:
Yes
Date of First Response:

 Description   

Steps to reproduce

  1. Use the attached form configuration.
  2. Open the form and persist some values
  3. Check JCR

Expected results

There should be a multifield with subnodes like 00, 01

Actual results

The subnodes are 0, 1, 2 and that means the strategy does resolve them when opening such form. 

Development notes

One thing that could be happening is that if somewhere along the way if the value is considered as a number, the leading zero would be dropped. However, I tried using propertyNameDecorator as PrefixNameDecorator and even though a word preceded the number, it would still be single digit instead of two digit.



 Comments   
Comment by Adam Siska [ 07/Oct/20 ]

configuration in attached yaml is incomplete, one must use particular orderHandler (not the default one):

orderHandler:
  class: info.magnolia.ui.editor.LexicographicallyIndexedJcrNodeOrderHandler$Definition
Comment by Šimon Demočko [ 07/Oct/20 ]

Documentation missed this configuration point. It was updated to include it. With it, works as expected. Closing as fixed by updating documentation.

Marking as documentation required, since we changed it, but no need to make further changes.

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