Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IBX-1201: Added handling of already generated aliases during subtree copying #3127

Merged
merged 7 commits into from
Nov 4, 2021

Conversation

barw4
Copy link
Member

@barw4 barw4 commented Oct 26, 2021

Question Answer
JIRA issue IBX-1201
Type bug
Target eZ Platform version v2.5
BC breaks no

There may be a specific case when the parent content has more than one translation and after trying to copy such subtree system wants to create more than one alias of the same exact child content. Such duplicated aliases should be skipped.

Checklist:

  • Provided PR description.
  • Tested the solution manually.
  • Provided automated test coverage.
  • Checked that target branch is set correctly (master for features, the oldest supported for bugs).
  • Ran PHP CS Fixer for new PHP code (use $ composer fix-cs).
  • Asked for a review (ping @ezsystems/engineering-team).

@barw4 barw4 requested a review from a team October 26, 2021 17:03
@barw4 barw4 self-assigned this Oct 26, 2021
@barw4 barw4 requested a review from Steveb-p October 26, 2021 17:54
Copy link
Contributor

@Nattfarinn Nattfarinn left a comment

Choose a reason for hiding this comment

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

Not sure about alreadyGeneratedPairs name, but that is just a nitpick. Something like alreadyAliasedLocations would be more appropriate I guess. It is just hard to grasp at glance what the hell is alreadyGeneratedPairs and why it is a part of copySubtree.

@barw4 barw4 requested review from Nattfarinn and a team October 27, 2021 08:26
@ViniTou ViniTou requested a review from a team November 3, 2021 08:16
Copy link
Member

@alongosz alongosz left a comment

Choose a reason for hiding this comment

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

Foremost, integration test coverage is missing. It seems you should be able to reproduce the same database error inside test container. (eZ/Publish/API/Repository/Tests).

@sonarcloud
Copy link

sonarcloud bot commented Nov 3, 2021

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link
Member

@alongosz alongosz left a comment

Choose a reason for hiding this comment

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

Looks good. I have minor CS remarks @barw4

eZ/Publish/API/Repository/Tests/LocationServiceTest.php Outdated Show resolved Hide resolved
eZ/Publish/API/Repository/Tests/LocationServiceTest.php Outdated Show resolved Hide resolved
eZ/Publish/API/Repository/Tests/LocationServiceTest.php Outdated Show resolved Hide resolved
eZ/Publish/API/Repository/Tests/LocationServiceTest.php Outdated Show resolved Hide resolved
@barw4 barw4 requested a review from alongosz November 3, 2021 14:15
Copy link

@tomaszszopinski tomaszszopinski left a comment

Choose a reason for hiding this comment

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

QA approved on eZPlatform-ee 2.5.25 with patch.

@alongosz alongosz merged commit ee1b0cf into 7.5 Nov 4, 2021
@alongosz alongosz deleted the ibx-1201-fix-copying-subtree-aliases branch November 4, 2021 14:01
@barw4
Copy link
Member Author

barw4 commented Nov 4, 2021

Merged into:
ezplatform-kernel/1.3: ezsystems/ezplatform-kernel@4fc4527
ezplatform-kernel/master: ezsystems/ezplatform-kernel@2df6632
ibexa/core: ibexa/core@3d61aa3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

6 participants