[DURACOM-326] fix possible issue on missing value for eperson patch#4289
[DURACOM-326] fix possible issue on missing value for eperson patch#4289tdonohue merged 1 commit intoDSpace:mainfrom
Conversation
tdonohue
left a comment
There was a problem hiding this comment.
@FrancescoMolinaro : Thanks for this PR. I gave this a test today, and it nearly works, but it appears the EPerson changes are no longer saving.
Here's what I've tried with this PR in place.
- First, I'm running in production mode (
npm run build:prod; npm run serve:ssr) - Go in the Database, and delete the Last Name of a specific EPerson.
- Now, login as an Admin from the UI
- Find that EPerson account in the "Access Control" -> "People" area. Verify that it has no Last Name
- Now, edit that EPerson. Add a new Last Name. Click "Save". A confirmation of the new name appears (no errors occur).
- Find that EPerson again. It still has no Last Name.
- Refresh the page, It still has no Last Name.
- Check in the database, and it still has no Last Name in the database either.
Is there something missing from this PR on the backend? It appears to me that the adding a new value to an EPerson isn't working properly.
|
Hi @tdonohue, thanks for the feedback, I tried again following the same steps you did but unfortunately I can't replicate the issue and I can see the the metadata in the DB and in the UI once added. I will be looking forward to your feedback. |
tdonohue
left a comment
There was a problem hiding this comment.
👍 Thanks @FrancescoMolinaro ! I retested this today and it is working properly. I'm not sure what happened with my prior tests, but I can verify that I'm able to successfully edit an EPerson with a missing "Last Name", and save a new "Last Name" value. (My suspicion is that I had something cached last time around, or maybe failed to properly build your PR.)
In any case, this looks great & works. I'm going to flag this for backport to 8.x and 7.6.x as it appears this same line of code appears in those releases as well.
|
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin dspace-7_x
git worktree add -d .worktree/backport-4289-to-dspace-7_x origin/dspace-7_x
cd .worktree/backport-4289-to-dspace-7_x
git switch --create backport-4289-to-dspace-7_x
git cherry-pick -x 7b9cd73ee0811cd3188f21b4bbf5e1e64280849e |
|
Successfully created backport PR for |
|
@FrancescoMolinaro : Could you port this back to |
[Port dspace-7_x] [DURACOM-326] fix possible issue on missing value for eperson patch #4289
References
Fixes #4287
Description
Improve patch for EPerson to allow "add" operation.
Instructions for Reviewers
Inserted "add" operation as possible for EPerson modification.
Implemented test to ensure presence of "add" operation, created mock.
To reproduce the bug the easiest way is to delete one of the metadata on the DB, e.g. lastname, for an EPerson, and then try to add that metadata via UI. (Step by step at #4287).
Checklist
This checklist provides a reminder of what we are going to look for when reviewing your PR. You do not need to complete this checklist prior creating your PR (draft PRs are always welcome).
However, reviewers may request that you complete any actions in this list if you have not done so. If you are unsure about an item in the checklist, don't hesitate to ask. We're here to help!
mainbranch of code (unless it is a backport or is fixing an issue specific to an older branch).npm run lintnpm run check-circ-deps)package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.