setting OU target weights can cause hold targeting to fail
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
Fix Released
|
Medium
|
Unassigned | ||
2.4 |
Fix Released
|
Medium
|
Unassigned |
Bug Description
If OU target weights higher than 1 are set in one or more OUs (via the circ.holds.
2013-06-24 20:11:40 PDT ERROR: duplicate key value violates unique constraint "copy_once_
2013-06-24 20:11:40 PDT DETAIL: Key (hold, target_
This appears to be caused by a change introduced in commit fc048034 (calculated proximity adjustments). Specifically, the proximity list generated in line 1542 of .../OpenILS/
As a consequence, the hold targeter would then try to insert multiple rows into ahcm that having the same {hold, target_copy}, violating the copy_once_per_hold constraint and thereby causing the targeting for that hold to fail.
Evergreen 2.4.0
Changed in evergreen: | |
status: | Fix Committed → Fix Released |
I offer http:// git.evergreen- ils.org/ ?p=working/ Evergreen. git;a=shortlog; h=refs/ heads/collab/ miker/unique- copy-list to address that. From the commit at the top:
The development of Calculated Proximity Adjustment (CPA) for 2.4 added a "prox" hold_copy_ map (ahcm) to store on variant of copy proximity. That
column to action.
value is calculated at the same time that certain other data structures are
set up, and is conceptually tied to them, so the resulting combined data
set is used to insert values into the ahcm. However, user configuration
can cause that data set to contain non-unique values, where the data structure
used previous to CPA was guaranteed to be unique. This lack of uniqueness
would then violate a constraint on the achm table. This commit restores the
required uniqueness for the purpose of creating the ahcm rows.