-
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
Update catalog metadata #6233
base: master
Are you sure you want to change the base?
Update catalog metadata #6233
Conversation
@BartChris would you mind doing a review for this pull request? |
@solth Yes, sure. |
Thank you! (Already requested review from you 😁) |
Converted to "Draft" to incorporate change requests made by @subhhwendt |
0b56f87
to
28738eb
Compare
Kitodo/src/main/java/org/kitodo/production/services/data/RulesetService.java
Fixed
Show fixed
Hide fixed
4b0ee55
to
265b488
Compare
5512191
to
5ef6a01
Compare
I experimented with your changes a bit. I added the new permissions, imported a process from a catalog, changed a few metadata fields, and clicked the new "sync" button. My first interpretation of the arrow icons was that they indicate the data flow. At first, I expected the left arrow to overwrite Kitodo metadata with the imported data, assuming the left arrow would “move” the data from right to left. I didn't really notice the text color. It took a minute to understand that the arrow is pointing towards the data that is kept. Currently, I don't have an idea how to improve this symbology. Maybe you could add a title to all the icons:
If I change the “Haupttitel” (metadata |
5ef6a01
to
7896b22
Compare
@thomaslow thank you for the remarks. I added some titles to the buttons as you suggested to hopefully make it easier to understand what each of them stands for. I agree that the buttons are not as inherently intuitive as we initially assumed when creating this mockup. Nonetheless I believe once people start using the new "Metadata update" dialog frequently it shouldn't take long to get accustomed to it. As for the metadata validation that is a very good and valid point. Incorporating Since these new buttons in the "Update" dialog are part of the same UI as the "delete" and "add" buttons mentioned above, though, I guess applying the same rules from the ruleset would be appropriate. I do think this will require some refactoring of the existing pull request, though, so I would like to ask @subhhwendt and @apiller to confirm this is indeed what is required and how they expect this functionality to work! |
For all my actions as user in the metadata editor I expect that the ruleset will be considered. So I hope that it is not to complicated to integrate a check of ruleset condition for the specific metadata in order to apply the function in a next step for a complete project . |
Regarding this point: I think the current behaviour is probably fine. We should not allow things which are illegal (adding a second metadatum when maxOccurs=1), but if a value is required and is not present, we should still allow to save. Otherwise a lot of structuring work might be lost, because the editor cannot save. (He or she might not know what to fill in at a particular field, but should still be able to save the progress). |
...gration/V2_134__Add_import_configuration_id_to_process_and_permission_to_update_metadata.sql
Outdated
Show resolved
Hide resolved
Things to check: The button is only enabled if one of the metadata elements in the current division has its key marked with Further Remarks
It is currently possible to overwrite values for keys which are marked as non-editable in the ruleset. I think this is the correct behaviour as this allows people to bring in new data from the leading system. So the non-editable would only apply to manual editing. What do you think @kitodo/kitodo-community-board?
|
@solth We had a discussion on the implementation in the @kitodo/kitodo-community-board. Based on that we would like you to implement the following behaviors
Right now, this is not possible Lines 494 to 496 in 7896b22
The default setting in the interface should stay "KEEP" (the data in Kitodo), but it should be possible to change that by clicking on the arrow (only left and right arrow possible in that scenario). If somebody explicitely defines "REPLACE" as setting for this key in the ruleset, the default setting in the interface is also "REPLACE", but the user should be able to change that as well by clicking on the arrow in the interface.
What should definitely be not considered is the setting for editing values. This only applies to manual editings and not changes coming from the source system. Setting a key to non editable should not prevent overwriting the key during re-import. (If the key is not set to "protected - see 3)
It should also be possible to "protect" a key from being overriden. As this is now possible for all the keys (see 1.), we would like to have an additional setting "protect", which makes it impossible to override a key in Kitodo with values from the catalog by disabling the arrows for that key in the user interface. This would be really important for some identifiers. Would it be possible to add that?
|
I implemented it this way in accordance with the description in #5904: "Eine Funktion “Löschen” von Metadaten in Kitodo.Production wird ausdrücklich nicht erwünscht. Auch dann nicht, wenn die Metadaten nicht (mehr) im Quellsystem vorhanden sind." I can remove this check and allow selecting empty values from the catalog, effectively deleting values in Kitodo, but I think it's important to note that this is a change of the original concept.
I will try to incorporate the
While I see the reasoning behind the idea of an additional setting, this is out of scope of the current pull request and will have to be added separately later.
This is something that has already been ruled out in the original concept (#5904): "Es werden entweder alle Gruppen übernommen oder gar keine" So this is something I didn't consider to begin with 😉 |
Thanks a lot @solth
I understand, and I apologize for the confusion caused by the back and forth on this issue. We’ve reconsidered, and there might indeed be situations where, for instance, a subtitle is deleted in the catalog. In such cases, it was deemed important to allow for the deletion of the incorrect subtitle in Kitodo, even if it means that all Kitodo keys could potentially be deleted (effectively changing the original concept). By implementing ruleset checks (as described in point 2), the deletion of a required key is still prevented.
Alright, i agree this can be added later. |
I encountered some anomalies while validating the 'LABEL' key, so it might be that the validation failure is specifically related to this key. But i have not tested that. The implementation of our validation recommendations should prevent this constellation as well. |
@thomaslow I added a tooltip to the double arrow in the header as well as to the individual arrow buttons in each row to make it clearer what each arrow means.
I added some checks that take ruleset |
@BartChris @thomaslow @subhhwendt I added some checks incorporating the Normally, when clicking the "Keep" button (⬅️ ) it is replaced with the "Add" button ( The new checks first verify that the next re-import mode in this cycle is possible while adhering to the rules from the ruleset. Otherwise the next mode in the order described above is skipped. If no new mode is possible, the button remains the same. |
Co-authored-by: Christoph Bartmann <[email protected]>
Co-authored-by: Christoph Bartmann <[email protected]>
…ta values from the catalog
34887f9
to
9a2cf4a
Compare
@BartChris These should all be fixed now. Would you mind re-reviewing the pull request? I think I have incorporated all of your remarks. |
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.
Looks good now!
Co-authored-by: Christoph Bartmann <[email protected]>
This pull request adds the feature to re-import metadata of individual processes from a configured catalog search interface using a new button in the metadata editors metadata panel:
If any differences are detected when comparing the newly imported metadata to that in the existing Kitodo process, the user is presented with a dialog listing all detected changes:
Using the arrow button between the old and new values, the user can decide to either keep the value currently in Kitodo, replace it with the updated value from the source or use both values. The selection can be changed by clicking on the arrow symbol between old and new values:
Bildschirmaufnahme.2024-09-24.um.16.01.49.mp4
If the process does not contain the functional metadata of type
recordIdentifier
- whose value is used to load the same data record from the source - or isn't assigned an import configuration of typeOPAC_SEARCH
, the button to re-import metadata is deactivated:Import configurations are now automatically assigned to newly created processes, but in ordner to adjust old processes for metadata re-import a new list action has been added that can be used to assign a specific import configuration to all processes selected in the process list:
In the following dialog the user can select the import configuration to assign to all selected processes:
Note: Two new permissions have been added for a) re-importing metadata and b) setting import configurations for selected processes. Since these permissions are not set to any role by default, system admins have to assign these permissions after updating their Kitodo installtion before being able to use the function added in this pull request.
Note 2: One aspect of the original description here that had to be implemented differently was the way metadata groups are displayed in the comparison popup dialog. Since it is not possible to determine whether one metadata group is a new group or an old group with some/most/all metadata entries changed, it is not possible to show just changed values. Instead, the implemention now shows all fields of all metadata groups when differences have been detected in one type of metadata group, so the user can make an educated decision whether he wants to keep the old values or replace them with the new values.
Note 3: during implementation of this function a bug was discovered that corrupts data of collapsed metadata groups in the metadata editor which is documented in #6231. A potential fix has been provided with #6232 but that has not been reviewed or merged into the code, yet, so reviewers testing the metadata re-import of this pull request should keep that in mind and not collapse any metadata groups while testing this new feature.
Fixes #6225