No error message when using duplicate barcodes in Serials Batch receive interface
Bug #1081551 reported by
Eva Cerninakova
This bug affects 6 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Usually when duplicate barcode is used adding new item in Evergreen (e.g.. in Holding maintenance interface), we get an error message.
But when we accidentally used duplicate barcodes for serial items in Serials Batch receive interface (we barcode each serial item individually) no error message appeared and we discovered the problem of coliding barcodes when checking out serial item in question,
see http://
I think there should be error message in Evergreen for using duplicate barcode in Serials batch receive interface too.
We use Evergreen version 2.2
description: | updated |
Changed in evergreen: | |
status: | New → Triaged |
Changed in evergreen: | |
milestone: | 2.6.1 → 2.6.2 |
Changed in evergreen: | |
assignee: | nobody → Jennifer Pringle (jpringle-u) |
Changed in evergreen: | |
milestone: | 2.6.3 → 2.6.4 |
Changed in evergreen: | |
status: | Fix Committed → Fix Released |
no longer affects: | evergreen/2.6 |
To post a comment you must log in.
Hello Eva.
This bug has been reported at other sites, too. A technical note follows to guide the development of a future patch.
serial.unit is a child table of asset.copy. Each table has a unique constraint for the "barcode" field (when the "deleted" field is false, anyway). These constraints do not prevent the duplicates between two rows if one row is only in asset.copy and the other is in serial.unit, due to a PostgreSQL limitation that I didn't appreciate when I wrote the serials batch receive code.
The "safest" fix, from the point of view of providing the best guarantee of future data integrity, may be a trigger on INSERT or UPDATE operations to serial.unit that tests for the presence of the incoming barcode explicitly, and raises an exception when found.