From 371b1293c4ce792e27af553ebde7c98e491bdea7 Mon Sep 17 00:00:00 2001 From: Dan Briem Date: Sun, 5 Mar 2023 01:57:31 +0000 Subject: [PATCH] LP#2009281 Duplicate Entries in Retrieve Recent Patrons Grid ID is a string when pulled from the route and a number when pulled from patron search, so the type mismatch causes the duplicate check to fail. This converts the ID to a number before appending it to the array of recent patrons. To test: 1. Set "Number of Retrievable Recent Patrons" setting to 2 2. Load a patron from Patron Search 3. Go to Circulation->Retrieve Last Patron 4. Go to Circulation->Retrieve Recent Patrons - note that the patron is not duplicated Signed-off-by: Dan Briem --- Open-ILS/web/js/ui/default/staff/services/patron_search.js | 1 + 1 file changed, 1 insertion(+) diff --git a/Open-ILS/web/js/ui/default/staff/services/patron_search.js b/Open-ILS/web/js/ui/default/staff/services/patron_search.js index d2ebe6c3fa..831ab52e02 100644 --- a/Open-ILS/web/js/ui/default/staff/services/patron_search.js +++ b/Open-ILS/web/js/ui/default/staff/services/patron_search.js @@ -135,6 +135,7 @@ function($q , $timeout , $location , egCore, egUser , egConfirmDialog , $locale if (service.maxRecentPatrons < 1) return; // no need to re-track same user + user_id = Number(user_id); if (service.current && service.current.id() == user_id) return; var patrons = -- 2.11.0