Request Preferences are erroneously being deleted

Description

When attempting to import a user without a requestPreference, mod-user-import will attempt to DELETE existing request preferences even if updateOnlyPresentFields is set to true.

To replicate:
1. Create a user manually with preferences so that the request preferences entry is created.
2. Fire off an import containing info about that user. Eg,

{ "users": [ { "username": "md331@duke.edu", "externalSystemId": "12345", "active": true, "patronGroup": "Staff" } ], "deactivateMissingUsers": false, "totalRecords": 1, "updateOnlyPresentFields": true }

3. Note the response contains a failedUsers entry. Eg,

{ "username": "md331@duke.edu", "externalSystemId": "12345", "errorMessage": "Failed to delete user preference.Failed to decode:Cannot construct instance of `java.util.LinkedHashMap` (although at least one Creator exists): no String-argument constructor/factory method to deserialize from String value ('159c0f18-85ba-417e-a705-7306adc6416d')\n at [Source: (String)\"\"159c0f18-85ba-417e-a705-7306adc6416d\"\"; line: 1, column: 1]" }

Now, obviously there shouldn't be an error if we are trying to delete the request preference. That's bug #1. But bug #2 is that the code should definitely not unconditionally attempt to delete the request preference if it's nullish, as it does here. It should be checking the value of updateOnlyPresentFields.

CSP Request Details

None

CSP Rejection Details

None

Potential Workaround

None

Checklist

hide

TestRail: Results

Activity

Show:

Khalilah GambrellJanuary 19, 2021 at 9:45 PM
Edited

Yes, . I did not know if we needed it as a part of a Honeysuckle hotfix. , can you have this detail added to the Honeysuckle release notes so that other implementers know how to work around this issue?

(OLD ACCOUNT) Erin NettifeeJanuary 19, 2021 at 9:10 PM
Edited

I'd like to see it fixed by Iris if possible, but don't have an expectation of it being backported to Honeysuckle since we do have a way to work with it right now. Is that reasonable ?

Khalilah GambrellJanuary 19, 2021 at 8:58 PM

I am reading the comments. Should this be a P2? It seems we have a workaround. Should we just add to the release notes?

cc: , and

patty.wanningerJanuary 19, 2021 at 8:40 PM

Assigning this to core: platform per KG's slack message.

Brooks TravisJanuary 19, 2021 at 5:19 PM

We're only supporting holdShelf at the moment, so 's fix should be sufficient for us right now.

Done

Details

Assignee

Reporter

Priority

Story Points

Sprint

Development Team

Spitfire

Fix versions

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs

Created January 19, 2021 at 4:57 PM
Updated June 17, 2021 at 7:18 PM
Resolved February 12, 2021 at 1:07 PM
TestRail: Cases
TestRail: Runs