TRIM(acnp.label || ' ' || acn.label || ' ' || acns.label)
AS call_number_label,
siss.label AS issuance_label,
- (ahr.usr <> ahr.requestor) AS is_staff_hold
+ (ahr.usr <> ahr.requestor) AS is_staff_hold,
+ ahcm_1.copy_count AS potential_copies
FROM action.hold_request ahr
JOIN asset.copy acp ON (acp.id = ahr.current_copy)
JOIN asset.call_number acn ON (acp.call_number = acn.id)
)
)
)
+ JOIN (
+ SELECT COUNT(target_copy) AS copy_count, hold
+ FROM action.hold_copy_map
+ GROUP BY 2
+ ) ahcm_1 ON (ahcm_1.hold = ahr.id)
LEFT JOIN serial.issuance siss
ON (ahr.hold_type = 'I' AND siss.id = ahr.target)
LEFT JOIN asset.copy_location_order acplo
<field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text" />
<field reporter:label="Issuance Label" name="issuance_label" reporter:datatype="text" />
<field reporter:label="Is Staff Hold?" name="is_staff_hold" reporter:datatype="bool" />
+ <field reporter:label="Potential Copies" name="potential_copies" reporter:datatype="int" />
</fields>
<links>
<link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
<th field="title" fpath="current_copy.call_number.record.simple_record.title" ffilter="true">Title</th>
<th field="barcode" fpath="current_copy.barcode" ffilter="true"></th>
<th field="parts" fpath="current_copy.parts.label" fsort="false">Parts</th>
+ <th field="copy_status" fpath="current_copy.status.name">Copy Status</th>
<th field="notes" fpath="notes.body" fsort="false" _visible="false">Hold Notes</th>
<th field="patron_barcode" fpath="usr.card.barcode" _visible="false" ffilter="true">Patron Barcode</th>
<th field="pickup_lib_name" fpath="pickup_lib.name" _visible="false" ffilter="true">Pickup Library</th>