diff --git a/config/vufind/KohaRest.ini b/config/vufind/KohaRest.ini index eba9e7a7aa2b760ba1c97e7348f6f1c261e42bbe..8868fa8988c4b5fa84b9f50fb0fb73ab286ded06 100644 --- a/config/vufind/KohaRest.ini +++ b/config/vufind/KohaRest.ini @@ -89,11 +89,12 @@ acceptTermsText = "I accept the terms in any language." ; VuFind item statuses [ItemStatusMappings] ;Item::Held = "Held" -; Custom "Not For Loan" statuses can be mapped by appending the authorized value to -; the status key like this (first one is negative authorized value, second one is -; positive): +; "Not For Loan" or "Lost" statuses can be mapped by appending the authorized value +; to the status key like this (first one is a negative authorized value, next ones +; are positive): ;Item::NotForLoan-1 = "Ordered" ;Item::NotForLoan4 = "At Bindery" +;Item::Lost4 = "Lost--Library Applied" ; Also "Not For Loan" item types can be mapped by appending the authorized value to ; the status key like this: ;ItemType::NotForLoan1 = "Reference Desk" diff --git a/module/VuFind/src/VuFind/ILS/Driver/KohaRest.php b/module/VuFind/src/VuFind/ILS/Driver/KohaRest.php index 2d0a4a120604b26c1b1a27e7e0701a4216f63b52..d06d020d76e9d2de610abc5e02a0febcbcf368e1 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/KohaRest.php +++ b/module/VuFind/src/VuFind/ILS/Driver/KohaRest.php @@ -182,7 +182,6 @@ class KohaRest extends \VuFind\ILS\Driver\AbstractBase implements */ protected $itemStatusMappings = [ 'Item::Held' => 'On Hold', - 'Item::Lost' => 'Lost--Library Applied', 'Item::Waiting' => 'On Holdshelf', ]; @@ -194,10 +193,11 @@ class KohaRest extends \VuFind\ILS\Driver\AbstractBase implements */ protected $itemStatusMappingMethods = [ 'Item::CheckedOut' => 'getStatusCodeItemCheckedOut', - 'Item::NotForLoan' => 'getStatusCodeItemNotForLoan', - 'Item::NotForLoanForcing' => 'getStatusCodeItemNotForLoan', + 'Item::Lost' => 'getStatusCodeItemNotForLoanOrLost', + 'Item::NotForLoan' => 'getStatusCodeItemNotForLoanOrLost', + 'Item::NotForLoanForcing' => 'getStatusCodeItemNotForLoanOrLost', 'Item::Transfer' => 'getStatusCodeItemTransfer', - 'ItemType::NotForLoan' => 'getStatusCodeItemNotForLoan', + 'ItemType::NotForLoan' => 'getStatusCodeItemNotForLoanOrLost', ]; /** @@ -1823,7 +1823,7 @@ class KohaRest extends \VuFind\ILS\Driver\AbstractBase implements } /** - * Get item status code for NotForLoan status + * Get item status code for NotForLoan or Lost status * * @param string $code Status code * @param array $data Status data @@ -1833,9 +1833,9 @@ class KohaRest extends \VuFind\ILS\Driver\AbstractBase implements * * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - protected function getStatusCodeItemNotForLoan($code, $data, $item) + protected function getStatusCodeItemNotForLoanOrLost($code, $data, $item) { - // NotForLoan is special: status has a library-specific + // NotForLoan and Lost are special: status has a library-specific // status number. Allow mapping of different status numbers // separately (e.g. Item::NotForLoan with status number 4 // is mapped with key Item::NotForLoan4):