Bug #85304

Sorting parent should not resort IRRE children

Added by Tymoteusz Motylewski over 1 year ago. Updated about 1 year ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2018-06-18
Due date:
% Done:

100%

TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

When changing sorting of the parent record, the irre children keep their sorting value.

see TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest::changeParentContentSorting

Associated revisions

Revision 5ad1c75c (diff)
Added by Tymoteusz Motylewski over 1 year ago

[BUGFIX] Do not re-sort IRRE children when sorting parent

When PID of the parent record has not changed, child records should
not be moved/sorted.

Little background helping reviewing the patch:

The 2 important changes are made in DataHandler.php line 4603
and DataHandlerHook.php around line 346.
In both cases the condition is added checking if the destination PID
of the record is the same as current one.
In that case, processing of the IRRE children is skipped.

All the changes made in the .csv files are reflecting that.
To validate them one can compare the content of the csv files
with LiveDefaultElements.csv datasets.

For example, check that sorting values in file:
core/Tests/Functional/DataHandling/IRRE/CSV/Modify/DataSet/changeParentContentSorting.csv
are the same as in the:
core/Tests/Functional/DataHandling/IRRE/CSV/DataSet/LiveDefaultElements.csv

In the Workspaces related datasets, you will see that there
are no move placeholders for IRRE children any more
(and versioned records have 0 instead of 4 in the t3ver_state).

See e.g.:
workspaces/Tests/Functional/DataHandling/FAL/Modify/DataSet/changeContentSorting.csv
or
workspaces/Tests/Functional/DataHandling/IRRE/CSV/Modify/DataSet/changeParentContentSorting.csv

This patch also solves the issue that sorting of the LIVE records (IRRE children)
were modified, when sorting parent record in the Workspaces,
see e.g. record tx_irretutorial_1nff_hotel uid 2 and 5 in file:
workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/DataSet/changeParentContentSorting.csv

Releases: master, 8.7
Resolves: #85304
Change-Id: I44573b334873400af628066beae84705c5af0408
Reviewed-on: https://review.typo3.org/57623
Tested-by: TYPO3com <>
Reviewed-by: Andreas Wolf <>
Tested-by: Andreas Wolf <>

History

#1 Updated by Tymoteusz Motylewski over 1 year ago

  • Description updated (diff)

#2 Updated by Tymoteusz Motylewski over 1 year ago

  • Status changed from New to Resolved

#3 Updated by Tymoteusz Motylewski over 1 year ago

  • Status changed from Resolved to Under Review

the backport for v8 is waiting
https://review.typo3.org/#/c/57623/

#4 Updated by Gerrit Code Review over 1 year ago

Patch set 2 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/57623

#5 Updated by Tymoteusz Motylewski over 1 year ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#6 Updated by Benni Mack about 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF