[MGNLUI-6455] nodeNameValidator doesn't work correctly in "createPage" case Created: 11/Dec/20  Updated: 21/Jun/21  Resolved: 09/Jun/21

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

Type: Bug Priority: Neutral
Reporter: Richard Gange Assignee: Roman Kovařík
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: 20m
Original Estimate: Not Specified

Attachments: PNG File already-exists.png    
Issue Links:
dependency
is depended upon by PAGES-447 Can't add child page with the same na... Closed
documentation
to be documented by MGNLUI-6756 DOC: New 'mode' property in 'nodeName... Closed
relation
is related to MGNLUI-6454 nodeNameValidator: introduce ability ... Closed
is related to MGNLUI-6735 NodeNameValidator doesn't work at roo... Closed
Template:
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)
Bug DoR:
[X]* Steps to reproduce, expected, and actual results filled
[X]* Affected version filled
Release notes required:
Yes
Documentation update required:
Yes
Date of First Response:
Epic Link: UI framework implementation
Sprint: UI FW 30
Story Points: 5

 Description   

Steps to reproduce

  1. Create page in the root with name "pageA"
  2. Create page in the root with name "pageB"
  3. Create page in the root with name "pageA"
    • page with name "pageA0" is created
  4. Create page inside pageB with name "pageA"
    • error  "pageA" already exists

Actual result
Name is checked for duplicates in parent of parent.

Expected result
Name is checked for duplicates in parent.

Note for Developers
This probably happens because on this line context object contains parent node for "createPage" use-case and the edited page in "renamePage" use-case.
Probably some parameter is required to define whether parent should be examined for duplicates.



 Comments   
Comment by Boris Faniuk [ 18/Jan/21 ]

Attached a pull request with proposed fix

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