Metahold view canceled hold error - non existant metarecord
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
New
|
Undecided
|
Unassigned |
Bug Description
EG 2.10.6 XUL Staff Client - I had a report of a network error when viewing canceled holds for a patron.
Error retrieving details for hold #193166
{
"payload":
[
]
,
"debug"
[
open-
]
failed for session
[
1499886141.
]
,
thread trace
[
1
]
:\nCan't call method \"id\" on an undefined value at /usr/local/
"status":500
}
It looks like we had two instances of canceled meta holds where the metarecord that they target no longer exists. When such a hold is in the list of canceled holds for a patron that error is presented to staff.
This query will show meta holds where there is no metarecord target anymore. I think that only the ones that are canceled will be a problem, since they will show up in the canceled holds list in the client.
select * from
action.hold_request ahr
where
not exists (select 1 from metabib.metarecord mm where mm.id=ahr.target)
and ahr.hold_type='M'
;
I don't understand metarecords/holds enough to understand why this happened. When I check the targeted copy for the holds the copies and bibs had been deleted. Do metarecords go away when their member records are deleted?
I just converted both meta holds to title holds to get rid of the error while still keeping the history. In our system this seems like a rare problem, I'm curious if others have this situation happen.
Thanks
Josh
Josh,
Do you think this is a duplicate of bug 1703957?