Checkout history fails on serials checkouts / deleted copies
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
Fix Released
|
High
|
Unassigned |
Bug Description
Evergreen 2.10.0
Two part bug. Both parts related.
1. If an action.circulation row exists with a target_copy value referencing a copy which has been deleted (removed from the database), the 2.10.0 DB upgrade script will fail with a foreign key constraint violation. This scenario is rare, but possible, since there is no foreign key constraint on action.
As discussed in IRC, the plan here is simply to avoid creating circ history rows when a circulation refers to a nonexistent copy.
2. Checkouts of serial.unit's do not translate successfully into action.
The solution here is to remove the foreign key constraint, consistent with action.circulation.
These changes will require new upgrade scripts and a modification to the 2.10.0 SQL upgrade script, since the upgrade script will fail if either of these conditions occurs.
Changed in evergreen: | |
status: | New → Confirmed |
importance: | Undecided → High |
assignee: | nobody → Kathy Lussier (klussier) |
Changed in evergreen: | |
status: | Fix Committed → Fix Released |
One point of clarification, action.circulation does enforce constraints on asset.copy / serial.unit via evergreen. fake_fkey_ tgr. (This is similar, but not as restrictive as a native constraint). We should add the same to action. usr_circ_ history.