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(api,ui-studies): update study move #2239

Merged
merged 5 commits into from
Dec 17, 2024
Merged

Conversation

skamril
Copy link
Member

@skamril skamril commented Nov 21, 2024

ANT-2390

@skamril skamril requested a review from hdinia November 21, 2024 16:20
@skamril skamril added back-end bug Something isn't working front-end labels Nov 21, 2024
@skamril skamril changed the title feat(api, ui-studies): update move dialog feat(api, ui-studies): update study move Nov 21, 2024
@skamril skamril changed the title feat(api, ui-studies): update study move feat(api,ui-studies): update study move Nov 21, 2024
@skamril skamril force-pushed the bugfix/ANT-2390_move-study branch 3 times, most recently from c920964 to 8b9cbca Compare November 21, 2024 16:31
@MartinBelthle MartinBelthle force-pushed the bugfix/ANT-2390_move-study branch from 8b9cbca to 23ffc1c Compare December 3, 2024 14:01
@skamril skamril force-pushed the bugfix/ANT-2390_move-study branch 4 times, most recently from df59674 to a6563cf Compare December 5, 2024 08:26
@MartinBelthle MartinBelthle marked this pull request as ready for review December 5, 2024 10:51
@skamril skamril force-pushed the bugfix/ANT-2390_move-study branch from 4a542af to 1afbc6b Compare December 11, 2024 11:02
@skamril skamril force-pushed the bugfix/ANT-2390_move-study branch 2 times, most recently from 780f89a to c7cb378 Compare December 16, 2024 09:40
Copy link
Member

@sylvlecl sylvlecl left a comment

Choose a reason for hiding this comment

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

Ok.
I think the behaviour we have chosen before this fix (to append the ID to the path) is not good from the user point of view, but that would be a separate topic.

study = self.get_study(study_id)
assert_permission(params.user, study, StudyPermissionType.WRITE)
if not is_managed(study):
raise NotAManagedStudyException(study_id)
if folder_dest:
new_folder = folder_dest.rstrip("/") + f"/{study.id}"
Copy link
Member

Choose a reason for hiding this comment

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

Just a note for later: would probably be best to use PurePosixPath objects than just strings to represent our paths.

sylvlecl
sylvlecl previously approved these changes Dec 16, 2024
webapp/src/components/App/Studies/MoveStudyDialog.tsx Outdated Show resolved Hide resolved
webapp/src/components/App/Studies/MoveStudyDialog.tsx Outdated Show resolved Hide resolved
webapp/src/services/api/study.ts Show resolved Hide resolved
webapp/src/utils/validation/string.ts Show resolved Hide resolved
webapp/src/utils/validation/string.ts Outdated Show resolved Hide resolved
@skamril skamril merged commit 88a7a53 into dev Dec 17, 2024
10 of 11 checks passed
@skamril skamril deleted the bugfix/ANT-2390_move-study branch December 17, 2024 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants