Quick receive gives a Database error if you try to receive multiple issues with the same call number

Bug #2053054 reported by Jane Sandberg
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
New
Undecided
Unassigned

Bug Description

This affects the Angularjs quick receive, and also the Angular one proposed in bug 1906462. Thanks to Jason Etheridge for discovering the issue!

To recreate:
1. In Serials Admin > Serial Items Template, create a new template.
2. On your favorite catalog record, go to Serials > Manage Subscriptions.
3. Create a new subscription and two distributions. At minimum, you will need a start date for your subscription, and a label for each of your distributions. Also, select the receiving template you created in step 1 for both distributions.
4. Add a prediction for your subscription. The enhanced concerto data set helpfully has a template called "Daily", I like creating a prediction from that template.
5. Predict issues for your subscription.
6. Go to quick receive. Select your subscription if necessary.
7. You should have two rows. Give them different barcodes, but the same call number label.
8. Notice that the items aren't received, and you get an error toast popup in the bottom right of the screen.

In the logs I get:
open-ils.cstore ERROR inserting asset::call_number object using query [INSERT INTO asset.call_number (create_date,creator,deleted,edit_date,editor,id,label,owning_lib,record,label_sortkey,label_class,prefix,suffix) VALUES (DEFAULT,1,DEFAULT,DEFAULT,1,DEFAULT,'4',102,261,DEFAULT,DEFAULT,-1,-1);]: 3505685 3505685: ERROR: duplicate key value violates unique constraint "asset_call_number_label_once_per_lib"
DETAIL: Key (record, owning_lib, label, prefix, suffix)=(261, 102, 4, -1, -1) already exists.

Tags: serials
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.