From 188717f43f6426991d820186152dc809acbb707b Mon Sep 17 00:00:00 2001
From: Brent Palmer <bop@brentopalmer.com>
Date: Mon, 5 Nov 2018 09:15:47 -0600
Subject: [PATCH] More accurate pickup location display for SierraRest holds
 (#1256)

---
 module/VuFind/src/VuFind/ILS/Driver/SierraRest.php | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/module/VuFind/src/VuFind/ILS/Driver/SierraRest.php b/module/VuFind/src/VuFind/ILS/Driver/SierraRest.php
index 96833ed5b69..6ab8c7b8f60 100644
--- a/module/VuFind/src/VuFind/ILS/Driver/SierraRest.php
+++ b/module/VuFind/src/VuFind/ILS/Driver/SierraRest.php
@@ -794,7 +794,9 @@ class SierraRest extends AbstractBase implements TranslatorAwareInterface,
                 'id' => $bibId,
                 'requestId' => $this->extractId($entry['id']),
                 'item_id' => $itemId ? $itemId : $this->extractId($entry['id']),
-                'location' => $entry['pickupLocation']['name'],
+                // note that $entry['pickupLocation']['name'] may contain misleading
+                // text, so we instead use the code here:
+                'location' => $entry['pickupLocation']['code'],
                 'create' => $this->dateConverter->convertToDisplayDate(
                     'Y-m-d', $entry['placed']
                 ),
-- 
GitLab