Uploaded image for project: 'Content Editor'
  1. Content Editor
  2. CONTEDIT-487

MigrateBlockToIntermediateParentTask doesn't preserve order of nodes

    XMLWordPrintable

Details

    • Yes
    • Yes
    • AuthX 21, AuthX 22
    • 5

    Description

      The task MigrateBlockToIntermediateParentTask doesn't preserve the order of nodes. Running the task can actually reorder the nodes to an incorrect state.

      Reproduce

      Before migration 6.2.10:

      After migration 6.2.24:

      Expected
      The blocks should be in the same order after the migration of data.

      Actual
      The blocks have been reordered as shown in the screenshots.

      Notes
      The problem is the task is not using NodeUtil#moveNodeAfter(). You have to iterate over the old list and keep track of the last node which was moved so that the nodes can be moved in the same order.

      Workaround
      You can fix the order as long as you have an older system to retrieve the order from.
      Execute scripts.getPreviousStoryOrder.xml to get a JSON object from the old system which can be fed into scripts.repairStoryBlockOrder.xml to be run on the new system. See comment below for more details.

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            1.
            QA Sub-task Completed Thuy To
            2.
            Port to master Sub-task Completed Unassigned

            Activity

              People

                lam.nguyen Lam Nguyen Bao
                rgange Richard Gange
                AuthorX
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:
                  Work Started:

                  Checklists

                    Bug DoR
                    Task DoD

                    Time Tracking

                      Estimated:
                      Original Estimate - Not Specified
                      Not Specified
                      Remaining:
                      Time Spent - 6d 5h Remaining Estimate - 1h
                      1h
                      Logged:
                      Time Spent - 6d 5h Remaining Estimate - 1h
                      6d 5h