[MGNLUI-6163] CLONE - Custom name property sync in DuplicateNodeAction Created: 27/Aug/20  Updated: 15/Sep/20  Resolved: 11/Sep/20

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

Type: Improvement Priority: Neutral
Reporter: Martin Haderka Assignee: Martin Haderka
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File image-2019-12-12-09-46-59-825.png     PNG File image-2019-12-12-09-49-49-076.png     PNG File image-2020-08-26-08-12-17-481.png     PNG File image-2020-08-26-08-15-45-087.png     PNG File image-2020-08-26-08-16-21-067.png     PNG File image-2020-08-26-08-18-06-932.png    
Issue Links:
Cloners
clones MGNLDAM-817 Asset names created from duplication ... Closed
relation
is related to MGNLUI-6109 DuplicateNodeAction creates confusing... Closed
supersession
supersedes MGNLUI-6108 DuplicateNodeActionDefinition creates... 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)
Date of First Response:
Epic Link: UI framework implementation
Sprint: UI FW 10
Story Points: 0

 Description   

Context

When uploading an asset, the user has to create asset name. If one recopies the full filename of the file being uploaded, then the file type will be part of the asset (node) name:

Example asset: Apollo 13 - Houston, We've Had a Problem-172374191.mp3

The issue

However, the current mechanism for creating names of duplicated assets negatively affects surface semantics of asset types. If the editor decided to duplicate this asset, he gets .mp4 and ** .mp5 ... and so on:

instead of something like:

Apollo 13 - Houston, We've Had a Problem-172374191-0.mp3

Suggestion:

 When duplicating an asset, the asset names should be parsed for the

 <filename><.><extension-2to4characters>

 pattern and only the <filename> part should be altered:

  • <filename>-0<.><extension>
  • <filename>-1<.><extension>
  • <filename>-2<.><extension>

Parsing for all the possible extensions could be a problem: [https://en.wikipedia.org/wiki/List_of_filename_extensions

]

Dev notes

We would not achieve <filename>-0<.>.<extension>in case where filename ends with a number. In the Houston example we will end up with 

Apollo 13 - Houston, We've Had a Problem-172374192.mp3

This is to be expected though, can be documented. 

We can use for Dam assets the getUniqueName from NodeNameHelper.

Consider also, that the duplicated asset can have a nodename/asset name named completely differently than the file name, so then we would not be going for 

  • <filename>-0<.><extension>

but rather

  • <assetname>-0<.><extension>


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

should go after 6.2.3 release

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