diff --git a/code/web/Drivers/Sierra.php b/code/web/Drivers/Sierra.php index 9b87c1c2f7..96425438e7 100644 --- a/code/web/Drivers/Sierra.php +++ b/code/web/Drivers/Sierra.php @@ -2456,6 +2456,9 @@ public function checkoutByAPI(User $patron, $barcode, Location $currentLocation) if (!empty($patron->ils_password)) { $params['patronPin'] = $patron->ils_password; } + if (!empty($currentLocation->circulationUsername)) { + $params['username'] = $currentLocation->circulationUsername; + } if (!empty($currentLocation->statGroup) && $currentLocation->statGroup != -1) { $params['statgroup'] = $currentLocation->statGroup; } @@ -2630,6 +2633,14 @@ public function checkInByAPI(User $patron, $barcode, Location $currentLocation): if (!empty($currentLocation->statGroup) && $currentLocation->statGroup != -1) { $sierraUrl .= '?statgroup=' . $currentLocation->statGroup; } + if (!empty($currentLocation->circulationUsername)) { + if (strpos($sierraUrl, '?') === false) { + $sierraUrl .= '?'; + }else{ + $sierraUrl .= '&'; + } + $sierraUrl .= 'username=' . $currentLocation->circulationUsername; + } $checkoutResult = $this->_sendPage( 'sierra.checkin', 'DELETE', $sierraUrl); if ($this->lastResponseCode >= 200 && $this->lastResponseCode < 300) { diff --git a/code/web/release_notes/24.09.00.MD b/code/web/release_notes/24.09.00.MD index 9caa189f34..d2f1ff32a1 100644 --- a/code/web/release_notes/24.09.00.MD +++ b/code/web/release_notes/24.09.00.MD @@ -22,8 +22,8 @@ // mark - Grove ## API Updates -- Update getUserForApiCall and checkoutILSItem APIs so they can be called internally. (AD-9) (*MDN-G*) -- Add checkInILSItem API to checkin titles. This method cannot be called externally. (AD-9) (*MDN-G*) +- Update getUserForApiCall and checkoutILSItem APIs so they can be called internally. (DIS-6) (*MDN-G*) +- Add checkInILSItem API to checkin titles. This method cannot be called externally. (DIS-6) (*MDN-G*) ### Grouped Work Display Updates - Allow records within a Grouped Work to have a custom sort order rather than forcing them to be alphabetic with Book first. (DIS-11) (MDN-G) @@ -40,13 +40,15 @@ ### Library & Location Updates -- Allow Stat Group to be defined for each location (Sierra only). Stat Group is used when checking items in or out to determine where to credit the checkout. The stat group can be left -1 to use the default behavior. (A-9) (*MDN-G*) +- Allow Stat Group to be defined for each location (Sierra only). Stat Group is used when checking items in or out to determine where to credit the checkout. The stat group can be left -1 to use the default behavior. (DIS-6) (*MDN-G*) +- Allow Circulation Useranme to be defined for each location (Sierra only). Circulation Useranme is used when checking items in or out to determine the location where the item was checked out. The Circulation Useranme can be left blank to use the default behavior. (DIS-6) (*MDN-G*) - Add an internal method to easily lookup the main location for a library. (*MDN-G*)
#### New Settings - Primary Configuration > Locations > ILS/Account Integration > Stat Group +- Primary Configuration > Locations > ILS/Account Integration > Circulation Username
@@ -57,7 +59,7 @@ - Do natural sorting of magazine holdings. (*MDN-G*) ### Self Check Updates -- Add a test page to test self check within Aspen Discovery. The test page can be used for both testing check outs as well as check ins. Check ins currently only work with the Sierra ILS. (AD-9) (*MDN-G*) +- Add a test page to test self check within Aspen Discovery. The test page can be used for both testing check outs as well as check ins. Check ins currently only work with the Sierra ILS. (DIS-6) (*MDN-G*) - Add additional error handling if SIP Host or Port are not configured when attempting a checkout by SIP. (*MDN-G*) - Refactor determination of whether to use SIP or API for checkouts within drivers. (*MDN-G*) diff --git a/code/web/sys/DBMaintenance/version_updates/24.09.00.php b/code/web/sys/DBMaintenance/version_updates/24.09.00.php index 221a5c554d..78c9ac0d49 100644 --- a/code/web/sys/DBMaintenance/version_updates/24.09.00.php +++ b/code/web/sys/DBMaintenance/version_updates/24.09.00.php @@ -57,6 +57,14 @@ function getUpdates24_09_00(): array { 'ALTER TABLE location add statGroup INT(11) DEFAULT -1', ] ], //add_location_stat_group + 'add_location_circulation_username' => [ + 'title' => 'Add Location Circulation Username', + 'description' => 'Add Location Circulation Username', + 'continueOnError' => false, + 'sql' => [ + 'ALTER TABLE location add circulationUsername VARCHAR(20)', + ] + ], //add_location_circulation_username 'add_permission_for_testing_checkouts' => [ 'title' => 'Add permission for testing checkouts', 'description' => 'Add permission for testing checkouts', diff --git a/code/web/sys/LibraryLocation/Location.php b/code/web/sys/LibraryLocation/Location.php index 7243349ddb..830059e3d8 100644 --- a/code/web/sys/LibraryLocation/Location.php +++ b/code/web/sys/LibraryLocation/Location.php @@ -76,6 +76,7 @@ class Location extends DataObject { public $scope; public $useScope; public $statGroup; + public $circulationUsername; public $facetLabel; public $groupedWorkDisplaySettingId; public $browseCategoryGroupId; @@ -712,6 +713,15 @@ static function getObjectStructure($context = ''): array { 'permissions' => ['Location ILS Connection'], 'note' => 'Sierra only, set to -1 to ignore', ], + 'circulationUsername' => [ + 'property' => 'circulationUsername', + 'type' => 'text', + 'label' => 'Circulation Username', + 'description' => 'The username to use when checking titles in and out for Sierra', + 'default' => '', + 'permissions' => ['Location ILS Connection'], + 'note' => 'Sierra only', + ], [ 'property' => 'validHoldPickupBranch', 'type' => 'enum',