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

feat(copy project): Add copy project functionality and refactor project hierarchy validation #1133

Merged
merged 6 commits into from
Dec 2, 2024

Conversation

jochenklar
Copy link
Member

This PR adds the possibility to copy projects. There is a new ProjectCopyView and a copy action in the ProjectViewSet. To make it work a new ProjectParentValidator needs to be added, since the old way to prevent that a project is set to be a child of itself was not flexible enough. Some tests needed to be added and fixes as well.

@jochenklar jochenklar added this to the RDMO 2.3.0 milestone Aug 22, 2024
@jochenklar jochenklar changed the base branch from dev-2.2.0 to release-2.3.0 August 25, 2024 13:00
@jochenklar jochenklar changed the base branch from release-2.3.0 to 2.3.0 August 25, 2024 13:00
@jochenklar jochenklar self-assigned this Aug 25, 2024
@jochenklar jochenklar changed the title Add copy project functionality and refactor project hierarchy validation feature(copy project): Add copy project functionality and refactor project hierarchy validation Nov 19, 2024
@jochenklar jochenklar changed the title feature(copy project): Add copy project functionality and refactor project hierarchy validation feat(copy project): Add copy project functionality and refactor project hierarchy validation Nov 19, 2024
@jochenklar jochenklar requested a review from MyPyDavid November 19, 2024 12:25
@jochenklar jochenklar marked this pull request as ready for review November 19, 2024 12:25
@MyPyDavid
Copy link
Member

tests need to be fixed, then this one should be merged before interview PRs

@MyPyDavid
Copy link
Member

ah with mysql I can reproduce locally the failing tests:

FAILED rdmo/projects/tests/test_viewset_project.py::test_copy[1-author-author] - assert 516 == (259 + 251)

maybe it has to do with bulk_create or some other mysql related things

rdmo/projects/utils.py Outdated Show resolved Hide resolved
@MyPyDavid MyPyDavid self-requested a review December 2, 2024 09:28
Copy link
Member

@MyPyDavid MyPyDavid left a comment

Choose a reason for hiding this comment

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

thanks, looks good!

@jochenklar jochenklar merged commit 2ab41f6 into 2.3.0 Dec 2, 2024
19 checks passed
@jochenklar jochenklar deleted the copy-project branch December 2, 2024 09:31
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