-
Notifications
You must be signed in to change notification settings - Fork 64
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
Add delete metadata buttons #4890
Add delete metadata buttons #4890
Conversation
Does this fix #4279? |
09baa9d
to
f57bd53
Compare
695c75f
to
a712808
Compare
I get a delete-metadata-exception.mov |
6be640d
to
064cad0
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.
Just a first part of the review. Will test more later.
One problem I encountered was that when I add a metadata group (for example "Person") during process creation and then add individutal metadata entries (for example "Display name" and "Family name") to the new group, the second entry will replace the first if I didn't add any values to the entries yet:
metadatagroup-entries.mov
Kitodo/src/main/java/org/kitodo/production/forms/createprocess/CreateProcessForm.java
Outdated
Show resolved
Hide resolved
Kitodo/src/main/java/org/kitodo/production/forms/createprocess/CreateProcessForm.java
Outdated
Show resolved
Hide resolved
Kitodo/src/main/java/org/kitodo/production/forms/createprocess/ProcessDetail.java
Show resolved
Hide resolved
Kitodo/src/main/java/org/kitodo/production/forms/createprocess/ProcessDetail.java
Show resolved
Hide resolved
Kitodo/src/main/java/org/kitodo/production/forms/createprocess/ProcessMetadata.java
Outdated
Show resolved
Hide resolved
Maybe this is because of |
ba5648c
to
30d2eea
Compare
753211e
to
fc1baf1
Compare
14cf54e
to
10147dd
Compare
Summary
Review
Exception message 4284
|
Did you mean that the metadata editor is closed with 'Save & exit' button or with 'Exit' button? |
I mean 'Save & exit'. I guess you ask, because it works for you. Therefore i tested a bit and found out that it only happens, when the metadata fields are only added and not changed. |
What you have described above is the intended logic so far, because for storing the metadata we are using an object that doesn't allow duplicates (2 identical objects). But if we now want to save duplicates, then we have to adjust the logic accordingly. |
I do not need duplicate objects, but i wanted to describe my observation. Usually, it is a bad sign, if (meta)data disappears. Maybe some users copy some elements and want them to adjust later, ... In such cases, it would be helpful to show a message. In this case for example:
Then it is clear that the following behaviour is intended. |
@IkramMaalej is right: The metadata is stored internally as a set (in the mathematical sense). A set is defined as that its elements have no order, and a set cannot contain the same element more than once. Java automatically applies these rules to the metadata. This means that all elements of the set are compared with each other, and if an element is identical to another, i.e. it occurs more than once, it is deduplicated. For metadata, that's absolutely fine if the same thing doesn't occur multiple times. The contract of the set does assure to you, that no metadata, that is not 100% identical, will ever be deleted. This is not a bug. |
@matthias-ronge : Thanks a lot for clarification. Then #4284 is solved, too. I do not know how to change the previous comments, but maybe that is the way to make the transparent discussions. Thus, from my point of view, everything in the PR works fine except of: |
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.
#4465 is not assessed.
9423e20
to
85bd82e
Compare
…editing the metadata tree table
85bd82e
to
feb5299
Compare
Part of #4322
Fixes #4279
Fixes #4457
Fixes #4468
Fixes #4893
Fixes #4284
This PR :