From d7ebe5d28c81ffcad93c17070cf1db58f793916a Mon Sep 17 00:00:00 2001 From: Jason Stephenson Date: Thu, 18 Dec 2014 14:58:16 -0500 Subject: [PATCH 1/1] Modify NCIP::ILS::Evergreen->requestitem. We now return AgencyId in the ItemId response field when returning a database id and not barcode. If we can't figure out the AgencyId to return, we set the ItemId/ItemIdentifierType to SYSNUMBER. There's room for improvement here, but no time right now. Signed-off-by: Jason Stephenson --- lib/NCIP/ILS/Evergreen.pm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/NCIP/ILS/Evergreen.pm b/lib/NCIP/ILS/Evergreen.pm index 70fe5fb..de56fbb 100644 --- a/lib/NCIP/ILS/Evergreen.pm +++ b/lib/NCIP/ILS/Evergreen.pm @@ -1053,8 +1053,14 @@ sub requestitem { } else { $data->{ItemId} = NCIP::Item::Id->new({ ItemIdentifierValue => $item->id(), - ItemIdentifierType => 'SYSNUMBER' - }) + }); + # if we have an $ou, we return the AgencyId, else set + # ItemIdentifierType. + if ($ou) { + $data->{ItemId}->AgencyId($ou->shortname()); + } else { + $data->{ItemId}->ItemIdentifierType('SYSNUMBER'); + } } # Look for UserElements requested and add it to the response: -- 2.43.2