diff --git a/config/vufind/PAIA.ini b/config/vufind/PAIA.ini index 38f6e661c4da13f6f16f45ad0a3338f0ea0a3184..bb45d469ca980f28eec7119a3928940b345e7330 100644 --- a/config/vufind/PAIA.ini +++ b/config/vufind/PAIA.ini @@ -31,6 +31,13 @@ baseUrl = "" ; during form processing. Most users should not need to change this setting. HMACKeys = "id:item_id:doc_id" +; PAIA status which should be mapped to Holds +; status are: 1 = reserved (not available yet but later) +; 2 = ordered (and not yet ready to be picked up) +; 3 = held by patron +; 4 = provided (and ready to be picked up) +status = "1:4" + ; Without customization the PAIA driver will offer to place a storageretrievalrequest ; for items with available service loan and set href for loan. The ; storageretrievalrequest will be performed via PAIA request (technically the same as @@ -43,6 +50,24 @@ HMACKeys = "id:item_id:doc_id" ; during form processing. Most users should not need to change this setting. HMACKeys = id:item_id:doc_id +; PAIA status which should be mapped to StorageRetrievalRequests +; status are: 1 = reserved (not available yet but later) +; 2 = ordered (and not yet ready to be picked up) +; 3 = held by patron +; 4 = provided (and ready to be picked up) +status = "2" + +; All kinds of transactions by a specific patron. Transactions are eg checked out +; items +[Transactions] +; PAIA status which should be mapped to Transactions +; status are: 1 = reserved (not available yet but later) +; 2 = ordered (and not yet ready to be picked up) +; 3 = held by patron +; 4 = provided (and ready to be picked up) +status = "3" + + ; The PAIA driver supports renewals in MyResearch views. The renewal will be ; performed via PAIA renew. ; The pre-defined HMACKeys (id:item_id:doc_id) should suffice to renew an item. No diff --git a/module/VuFind/src/VuFind/ILS/Driver/PAIA.php b/module/VuFind/src/VuFind/ILS/Driver/PAIA.php index 35a7429cd81ec0e8211a192ad6e1308765800baf..b61780ee826cae176cd867d9a3c7eed780fde32c 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/PAIA.php +++ b/module/VuFind/src/VuFind/ILS/Driver/PAIA.php @@ -707,11 +707,12 @@ class PAIA extends DAIA */ public function getMyHolds($patron) { - // filters for getMyHolds are: + // filters for getMyHolds are by default configuration: // status = 1 - reserved (the document is not accessible for the patron yet, // but it will be) // 4 - provided (the document is ready to be used by the patron) - $filter = ['status' => [1, 4]]; + $status = $this->config['Holds']['status'] ?? '1:4'; + $filter = ['status' => explode(':', $status)]; // get items-docs for given filters $items = $this->paiaGetItems($patron, $filter); return $this->mapPaiaItems($items, 'myHoldsMapping'); @@ -785,9 +786,10 @@ class PAIA extends DAIA */ public function getMyTransactions($patron) { - // filters for getMyTransactions are: + // filters for getMyTransactions are by default configuration: // status = 3 - held (the document is on loan by the patron) - $filter = ['status' => [3]]; + $status = $this->config['Transactions']['status'] ?? '3'; + $filter = ['status' => explode(':', $status)]; // get items-docs for given filters $items = $this->paiaGetItems($patron, $filter); return $this->mapPaiaItems($items, 'myTransactionsMapping'); @@ -805,9 +807,10 @@ class PAIA extends DAIA */ public function getMyStorageRetrievalRequests($patron) { - // filters for getMyStorageRetrievalRequests are: + // filters for getMyStorageRetrievalRequests are by default configuration: // status = 2 - ordered (the document is ordered by the patron) - $filter = ['status' => [2]]; + $status = $this->config['StorageRetrievalRequests']['status'] ?? '2'; + $filter = ['status' => explode(':', $status)]; // get items-docs for given filters $items = $this->paiaGetItems($patron, $filter); return $this->mapPaiaItems($items, 'myStorageRetrievalRequestsMapping');