[MGNLDATA-249] Renaming existing node to a substring od the former name only affects the name property, but not the node name itself. Created: 25/Feb/14  Updated: 18/Mar/14  Resolved: 17/Mar/14

Status: Closed
Project: Magnolia Data Module (closed)
Component/s: None
Affects Version/s: 1.6.5, 1.7.8
Fix Version/s: 1.7.10

Type: Bug Priority: Neutral
Reporter: Christian Ringele Assignee: Roman Kovařík
Resolution: Fixed Votes: 0
Labels: support
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: JPEG File DataModule_ReanmeToSubstring.jpg    
Issue Links:
causality
Template:
Acceptance criteria:
Empty

 Description   

Reproduce the problem:

  • Go the the contacts type in data module
  • Open the dialog of "JMustermann"
  • Rename the name field to a substring: JMuster
    Result:
    The property "name" was changed, but the node name itself is unchanged.
    (DataModule_ReanmeToSubstring.jpg)

Problem source:
info.magnolia.module.data.dialogs.DataDialog.getNewNodeName()
Detecting the new node name fails to the else statement:

if(this.create ||  !this.nodeName.startsWith(name)){
  name = Path.getUniqueLabel(hm, this.path, name);
}
else{
  name = this.nodeName;
}

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