Skip to content
Snippets Groups Projects
Unverified Commit 37c55aa5 authored by Ere Maijala's avatar Ere Maijala Committed by GitHub
Browse files

Alma: Fix date and status display for the holds list. (#1501)

As far as I can see there's no way to determine if a request is in transit. I'm open to suggestions if e.g. @betullam knows more.

I suspect the same changes should be done to the other two methods, but I don't currently have a way of testing it.
parent a1c61972
No related merge requests found
......@@ -881,11 +881,25 @@ class Alma extends AbstractBase implements \VuFindHttp\HttpServiceAwareInterface
);
$holdList = [];
foreach ($xml as $request) {
$lastInterestDate = $request->last_interest_date
? $this->dateConverter->convertToDisplayDate(
'Y-m-dT', (string)$request->last_interest_date
) : null;
$available = (string)$request->request_status === 'On Hold Shelf';
if ($available) {
$lastPickupDate = $request->expiry_date
? $this->dateConverter->convertToDisplayDate(
'Y-m-dT', (string)$request->expiry_date
) : null;
}
$holdList[] = [
'create' => (string)$request->request_date,
'expire' => (string)$request->last_interest_date,
'create' => $this->dateConverter->convertToDisplayDate(
'Y-m-dT', (string)$request->request_date
),
'expire' => $lastInterestDate,
'id' => (string)$request->request_id,
'in_transit' => (string)$request->request_status !== 'On Hold Shelf',
'available' => $available,
'last_pickup_date' => $lastPickupDate,
'item_id' => (string)$request->mms_id,
'location' => (string)$request->pickup_location,
'processed' => $request->item_policy === 'InterlibraryLoan'
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment