Skip to content

Conversation

@DavidHedden
Copy link
Contributor

@DavidHedden DavidHedden commented Mar 26, 2024

Use copyMappingArray instead of first key from $pasteDatamap, since it could include multiple id's.

To clarify where this is a problem. When copying multiple containers via the data handler while using 'action' => 'paste' instead of a target. The $pasteDataMap provided to the hook will not clear itself after performing each copy of a container. So the first provided container will be used as a target for all the child records.

@achimfritz
Copy link
Contributor

Hi @DavidHedden , looks good, thanks, can you also write a functional test?

@DavidHedden
Copy link
Contributor Author

Hi @achimfritz, i added a test were it's validated that the child records are in the correct container.
I left out testing for correct amount of child records, sorting etc., since they are covered already.

@DavidHedden DavidHedden force-pushed the patch-1 branch 2 times, most recently from 299b778 to eae2b1f Compare March 28, 2024 11:12
Use copyMappingArray_merged instead of first key from $pasteDatamap, since it could include multiple id's
@DavidHedden
Copy link
Contributor Author

Fixed the formatting issues. Should've seen that there is a script for that.

Copy link
Contributor

@achimfritz achimfritz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 , very cool, thanks

@achimfritz achimfritz merged commit 83f160b into b13:master Mar 28, 2024
@DavidHedden DavidHedden deleted the patch-1 branch March 28, 2024 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants