[MGNLUI-6288] DefaultJcrNodeOrderHandler is prefix agnostic, consider rewriting to allow naming consistency Created: 07/Oct/20  Updated: 07/Oct/20

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

Type: Improvement Priority: Low
Reporter: Šimon Demočko Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Issue split
split from MGNLUI-6253 Allow MultiFields using jcrChildNodeP... 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)

 Description   

Added business value

Low. It's only about how MultiField nodes look in JCR view - whether they are named consistently. Does not affect functionality.

Current situation

Once MGNLUI-6190MGNLUI-6253 is integrated, we'll allow resolving multi-field nodes that do not follow the naming convention strictly. However, such nodes retain their inconsistent names.

E.g. 

multi:
  0: 
    field: 0_value
  00: 
    field: 00_value
  multi:
    field: someText_value
  multi1:
    field: someText1_value
  something1: 
    field: someText1_value
  someText1_de: 
    field: someText1_de_value

would, after resaving, turn into

multi:
  0: 
    field: 0_value
  1: 
    field: 00_value
  multi2:
    field: someText_value
  multi3:
    field: someText1_value
  something4: 
    field: someText1_value
  someText1_de: #stays ignored b/c of locale suffix that will cause the node not to be resolved
    field: someText1_de_value

So the prefixes stay empty or whatever they were before, and the numbers get updated.
The implementation reuses whatever prefix it finds via regex when handling a node. This means inconsistent prefixes stay inconsistent.

Desired situation

  • Either we will rename the node after resolving right away since we detect its name is bad (this would be a change outside of OrderHandler, and not sure if it's possible)
  • or the order handler will have to know the MultiField's name so it can stop guessing the prefix and replace whatever is there.
     
    Or we won't care about it. It's only a question of looks in the JCR browser.

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