-
Notifications
You must be signed in to change notification settings - Fork 63
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
Rename media files corresponding to their order value #5701
Conversation
675b0aa
to
d5600f2
Compare
6a63400
to
6946744
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good and it works for me!
Suggestions:
- Handling of error if number of filename length in project is too low for all images
- A test for resetting the media names when user not save changes after media renaming.
How do you do this?
After media renaming i restarted the application. All images where found but the meta.xml doesn't changed. How do you save the current state?
...o-DataManagement/src/main/resources/db/migration/V2_124__Add_permission_to_rename_images.sql
Outdated
Show resolved
Hide resolved
I approved the PR last week, but I am still struggling with the scenario where the media is renamed and not saved, or the However, I was unable to produce such an problem during my tests by stopping the server immediately after the replacement. Therefore, I will maintain the approval from my side. |
This is indeed not required as the |
6946744
to
f18322e
Compare
This PR adds a button to the metadata editor allowing users to rename all media files of the process according to the corresponding physical divisions
ORDER
attribute.The new filename will be padded with
0
on the left to reach a filename length that can be configured for each project in the project settings.The button is only displayed when the current user has the (new) permission to rename media files, which is not assigned to any role by default.
After renaming the media files has finished, a result dialog will be displayed, showing the number of files renamed in all configured process folders.
Filename changes will be reverted if the user does not explicitely save changes in the metadata editor. This approach is consistent with other functionalities in the editlor like uploading or removing images, which will also be reverted when leaving the metadata editor without clicking the "Save" button.
Fixes #5601