LP#2009281 Recent patrons duplication issues user/dbriem/lp2009281_recent_patrons_duplicates
authorDan Briem <dbriem@wlsmail.org>
Wed, 10 May 2023 15:04:27 +0000 (15:04 +0000)
committerDan Briem <dbriem@wlsmail.org>
Wed, 10 May 2023 15:04:27 +0000 (15:04 +0000)
commita2aafc889c35decc30a7ff3cc4e63b47cc6302da
treeea85fa1e01df7c8f5ab116bd8dd0235627dbfb61
parent4c372bd55b710d690297fcea22db528092487f0b
LP#2009281 Recent patrons duplication issues

Converts the user ID to a number to avoid duplicates caused
by type mismatches.

Removes duplicates before the ID is added or the array is
trimmed to avoid prematurely removing IDs.

To test:
1. Set "Number of Retrievable Recent Patrons" setting to 2
2. Open a patron record
3. Open a different patron record
4. Open Circulation->Retrieve Last Patron
5. Open Circulation->Retrieve Recent Patrons
   Note: both patrons are present without duplicates

Signed-off-by: Dan Briem <dbriem@wlsmail.org>
Open-ILS/src/eg2/src/app/staff/circ/patron/patron.service.ts
Open-ILS/web/js/ui/default/staff/services/patron_search.js