[MGNLUI-3516] DialogMigrationTask does not properly migrate tabs with extends property and some override items Created: 07/Aug/15  Updated: 15/Apr/16  Resolved: 16/Sep/15

Status: Closed
Project: Magnolia UI
Component/s: None
Affects Version/s: 5.3.10
Fix Version/s: 5.3.11, 5.4.3

Type: Bug Priority: Neutral
Reporter: Viet Nguyen Assignee: Sang Ngo Huu
Resolution: Fixed Votes: 0
Labels: affect-vn-project
Remaining Estimate: 0d
Time Spent: 1d 5.5h
Original Estimate: 1d

Attachments: PNG File Screen Shot 2015-08-07 at 10.34.21 AM.png     Text File magnolia_ui_dialog.patch    
Issue Links:
causality
is causing MGNLSTK-1512 Remove empty fields node from dialog ... 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)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:
Sprint: Basel 10
Story Points: 2

 Description   
  • During migration process from 4.5.24 to 5.3.10, we experienced that DialogMigrationTask did not properly migrate tabs with extends property and some override items. It omitted override items then the migrated version missed all those data.
  • Refer to attached patch as an approach.


 Comments   
Comment by Viet Nguyen [ 07/Aug/15 ]
  • In this case (attached image), 'tabMobile' was migrated with solely 'extends' property, its 'navTitleMobile' sub node was missed.
Comment by Viet Nguyen [ 07/Aug/15 ]
  • Attached patch file is an approach.
Comment by Viet Nguyen [ 10/Aug/15 ]
  • Updated patch file with some updates to support extends from relative path as well as support partially re-run the migration task (not throw exception when the node already exist).
Comment by Philip Mundt [ 14/Sep/15 ]
  • Changes made to tab migration will now produce empty node fields even when the tab only extends another node without specifying addional fields, resulting in potential migration diffs (currently there are none, but the end result it not desirable anyway).
    • Providing additional tests for this should be fairly easy
  • Please move everything back into method handleTab (additional method handleTabConfig is not necessary and adds a third method related to tab migration).
  • Please adjust commit message accordingly.
Comment by Philip Mundt [ 15/Sep/15 ]

Provided solution still creates an empty node fields even when there are no custom fields in a tab definition (when using just extends).

Simple fix would have been a check whether controls.hasNext() before actually creating the fields node in info.magnolia.ui.dialog.setup.DialogMigrationTask#handleTab()!

Added fix and test on branch (including fresh rebase) MGNLUI-3516-sq.

Comment by Roman Kovařík [ 16/Sep/15 ]

Reopened: empty fields nodes should be removed from bootstrap files in STK, see https://jenkins.magnolia-cms.com/view/Migration/job/int_migration-tests_4.5-to-5.4.x-branch/Diff_Reports/. This ticket can be switched back to Integrated when a follow up ticket in STK will be created.

Comment by Philip Mundt [ 16/Sep/15 ]

Re-resolved by fixing MGNLSTK-1512

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