Details
-
Story
-
Status: Open (View Workflow)
-
P2
-
Resolution: Unresolved
-
None
-
None
-
CP: R3 2022 roadmap, CP: Roadmap backlog
-
Core: Platform
-
Duke
-
Lack of testing
Description
Overview:
This has been tested on a Duke environment running Lotus, on folio-snapshot, and on folio-lotus.
Mod-user-import has a supported attribute that can be included called "updateOnlyPresentFields" (https://github.com/folio-org/mod-user-import) – from readme -
"This should be true if only the fields present in the import should be updated, e.g. if a user address was added in FOLIO but that type of address is not present in the imported data then the address will be preserved."
This should mean that if a JSON file sent to /user-import includes
"updateOnlyPresentFields": true
that if the JSON record for the user does NOT include the field, it should not be overwritten.
It appears that mod-user-import does not respect this flag for custom fields that are set on a record, and does not respect the flag for email address. I did not test additional fields.
Steps to Reproduce issue with custom fields
- On the FOLIO environment where you are testing, set up a user with permission user-import.all and get the user API token.
- Set up a custom field on the user record with name "Patron Type" and at least one value named "Staff - Library". See JSON: moduimp-76-customfield.json
- Send the JSON body formatted for mod-user-import ( test-user-moduimp76.json
) to the environment with your user-import user.
- Log into the environment and view the user. Verify that all of the records included in the body of the POST request are on the user record.
- Edit the JSON body and remove the custom field.
- Send the POST again to your testing environment with the new JSON body.
- Log into the environment and view the user.
Expected Results: The custom field value remains since it was not included in the JSON body.
Actual Results: The custom field value has been removed.
Steps to Reproduce issue with email address
- On the FOLIO environment where you are testing, set up a user with permission user-import.all and get the user API token.
- Set up a custom field on the user record with name "Patron Type" and at least one value named "Staff - Library". See JSON: moduimp-76-customfield.json
- Send the JSON body formatted for mod-user-import ( test-user-moduimp76.json
) to the environment with your user-import user.
- Log into the environment and view the user. Verify that all of the records included in the body of the POST request are on the user record.
- Edit the JSON body and remove the email address.
- Send the POST again to your testing environment with the new JSON body.
- Log into the environment and view the user.
Expected Results: The email address remains.
Actual Results: The email address has been blanked out.
Additional Information:
URL:
Interested parties:
TestRail: Results
Attachments
Issue Links
- relates to
-
MODUIMP-8 Data elements from "personal" object deleted upon update
-
- Open
-
-
MODUIMP-78 JSON Patch Batch
-
- Open
-