-
Notifications
You must be signed in to change notification settings - Fork 446
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
Unreliable save when changing order (drag and drop) of multiple entries per MD field in submission form #2004
Comments
@Marwa1988-S : Thanks for reporting this. While your example is showing a custom metadata field (that language-based "Keywords" field doesn't exist by default), I can reproduce this with the default "Author" field for an Item:
My best guess here is that the drag and drop reordering of a new value is having some sort of issue. It appears that "Author 4" is added, but the drag & drop reorder doesn't fully trigger, which means when you remove the second author, you remove "Author 2" instead of "Author 1". I'll pull this over to our 7.5 board and see if I can find someone to dig into this immediately. |
Should be retested in 7.6 to verify problem still exists |
Yes, I just tested this. The problem is still the same in DSpace 7.6 |
I have added a longer comment to #3217, I believe it is a problem in the subscriptions to valueChanges for onebox components handling fields configured for controlled vocab / authority (even if the values are uncontrolled), and the fact that it does not allow for the group index to change. |
Due to the many different constellations, I'm not sure whether my approach will help here, but it's worth a try: Please have a look at this file: Line 217 should AFAIK look like this: This will set the "place" property correctly in the PATCH response and the entries should be displayed correctly in the frontend. I would appreciate feedback - I may be able to contribute a merge request next week. |
@jlipka , this is a valuable finding - I have found more places in the Java code base where the At least, the problem described in issue #3217 is not fixed ( |
@jlipka , the same line of code can be found in |
The invalid usage of the |
Hi @jlipka , thanks - yes, this is a good catch and we should definitely be using This change may solve any issues related to re-ordering/patch update for existing relationships displayed in a submission form, but #3217 was specifically about onebox metadata values, as far as I know (typically authority controlled fields), which would not have a relationship and so would not be impacted by this change. |
@jlipka I've included the proposed bug fix (line 217 in |
HI @jlipka, hi @saschaszott, does the fix added in the already merged PR #9742 also fixed the present issue on multiple MD entries ordering? Thanks! |
@pilasou I am not able to reproduce the incorrect behavior described above (on demo.dspace.org), so things look good to me. |
Thanks @jlipka ! @tdonohue given that the incorrect behavior cannot be reproduced (i have also tried on the sandbox both on Subject Keywords and Authors fields: changing order and deleted and then save, the changes are kept), it seems that the PR DSpace/DSpace#9742 has solved this issue and it can be closed. |
Closing, appears to have been fixed by DSpace/DSpace#9742 (and was already ported to 7.x for 7.6.3 and 8.x for 8.1) |
Describe the bug
When changing the values order of a metadata field, or adding a new one and then reordering them, sometimes this change is not properly passed in the request, and when testing the newly changed metadata, it was found that the request does not contain the current correct order of metadata values and sometimes not all metadata values themselves if one was deleted after reordering them.
To Reproduce
Steps to reproduce the behavior:
1. Login
2. Navigate to the Workflow tasks, claim an item then edit
3. In edit-submission form add some new keywords
4. Change the keywords order, then delete one or some of them, then save
Expected behavior
The new keywords with their new order should be correct saved but aren't.
Here is an example:
Then add new one (kw1), drag it to be the first, and delete the second. then save:

It is expected that the new keywords are properly saved and displayed, but the result was so in item view page:

Angular is firing off an ADD patch and when testing the value in the patch operation where the changed metadata is located, it found that it doesn't always come with the correct metadata.
The text was updated successfully, but these errors were encountered: