Receiving line items from the Acq search reports "Line Item(s) Received" even if there is a db error
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
New
|
Undecided
|
Unassigned |
Bug Description
Steps to recreate:
1. Install a recent version of Evergreen that does *not* have the fix to bug 2023690 (at least, that is how I was able to create a database error)
2. Load the enhanced concerto data set
3. In the client, go to Acq > General search
4. Search for Line Item Status == On Order
5. Select one or more line items
6. Under actions, select "Mark selected items as received"
7. Note that you get an encouraging green toast saying "Line Item(s) Received"
8. Note that the line items aren't actually received
9. Note that the logs have open-ils.cstore ERROR updating acq::lineitem object with id = 3: 3505685 3505685: ERROR: duplicate key value violates unique constraint "acq_lineitem_
10. Note that the message sent from OpenSRF has a status code 200, but a DATABASE_
"statusCode": 200,
"content": {
"textcode": "DATABASE_
"servertime": "Thu Feb 29 04:29:20 2024",
"ilsevent": "2001",
"stacktrace": "/usr/local/
"pid": 11115,
"debug": "Exception: OpenSRF:
"desc": "The attempt to write to the DB failed",
The purchase order screen handles this better, actually displaying to the user that the receive attempt failed. I'm not sure if the issue would be better handled on the Perl side (e.g. if you hit a database error, open-ils.