non-title holds can be hidden from View Holds tab when bib changes

Bug #1858492 reported by Rogan Hamby
56
This bug affects 13 people
Affects Status Importance Assigned to Milestone
Evergreen
Confirmed
Medium
Unassigned

Bug Description

Take a volume hold and look at the View Holds tab for it's bib record. The hold appears. Now merge the record's assets to a new bib where the current volume is kept (copies not moved to another volume volume). Because the volume is kept the hold is not updated. Since the hold is not updated the reporter.hold_request_record_mapper is never triggered and the value in bib_id is never updated. This can be easily verified in the database. Since the context bib must match the bib_id entry the holds are now hidden.

There might be other ways this becomes a problem other than during record merges.

Tags: circ-holds
Revision history for this message
Rogan Hamby (rogan-hamby) wrote :

A little more data, the specific issue that the on UPDATE the trigger function skips re-assigning the record value if the target and hold_type have remained the same ... which of course does not mean that the parent bib hasn't changed. We could fix that my basically flattening out the trigger function to always run but that's a lot of overhead for every hold update versus a relatively uncommon merging of records. I'm more inclined to add logic to merging record assets to address this but that has the disadvantage of essentially duplicating logic in two places which is .... not good.

Revision history for this message
Rogan Hamby (rogan-hamby) wrote :

For seeing affected holds:

select ahr.id, 'V' as hold_type
from reporter.hold_request_record rhrr
join action.hold_request ahr on ahr.id = rhrr.id
join asset.call_number acn on acn.id = ahr.target
where ahr.fulfillment_time is null and ahr.cancel_time is null and (ahr.expire_time is null or ahr.expire_time > now()) and ahr.hold_type = 'V'
and acn.record != rhrr.bib_record
UNION ALL
select ahr.id, 'C' as hold_type
from reporter.hold_request_record rhrr
join action.hold_request ahr on ahr.id = rhrr.id
join asset.copy ac on ac.id = ahr.target
join asset.call_number acn on acn.id = ac.call_number
where ahr.fulfillment_time is null and ahr.cancel_time is null and (ahr.expire_time is null or ahr.expire_time > now()) and ahr.hold_type = 'C'
and acn.record != rhrr.bib_record
UNION ALL
select ahr.id, 'P' as hold_type
from reporter.hold_request_record rhrr
join action.hold_request ahr on ahr.id = rhrr.id
join biblio.monograph_part bmp on bmp.id = ahr.target
where ahr.fulfillment_time is null and ahr.cancel_time is null and (ahr.expire_time is null or ahr.expire_time > now()) and ahr.hold_type = 'P'
and bmp.record != rhrr.bib_record
;

tags: added: circ-holds
Revision history for this message
Elaine Hardy (ehardy) wrote :

This is still occurring in 3.8.0.

 Merging records does not fully transfer non-title holds to the target record. The hold remains and will process correctly but is not visible in the current record view holds. It is visible in the patron record and on the merged and deleted record

Transferring volumes/items may also have the same issue.

Changed in evergreen:
status: New → Confirmed
Revision history for this message
Britta Dorsey (bdorsey-isl) wrote :

This is still an issue in 3.9.2.

A record with part-level holds was merged (as lead) with another record. The holds are no longer visible under View Holds, but are accessible via the patron accounts.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.