Receiving line items from the Acq search reports "Line Item(s) Received" even if there is a db error

Bug #2055416 reported by Jane Sandberg
6
This bug affects 1 person
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_history_pkey"
10. Note that the message sent from OpenSRF has a status code 200, but a DATABASE_UPDATE_FAILED message. Here is a partial view of what I got in the OpenSRF websocket traffic (using these instructions to see it in Firefox developer tools, fwiw: https://wiki.evergreen-ils.org/doku.php?id=newdevs:angular_making_calls#firefox)

"statusCode": 200,
  "content": {
   "textcode": "DATABASE_UPDATE_FAILED",
   "servertime": "Thu Feb 29 04:29:20 2024",
   "ilsevent": "2001",
   "stacktrace": "/usr/local/share/perl/5.30.0/OpenILS/Utils/CStoreEditor.pm:865 (eval 3507):1 /usr/local/share/perl/5.30.0/OpenILS/Application/Acq/Order.pm:242",
   "pid": 11115,
   "debug": "Exception: OpenSRF::DomainObject::oilsMethodException 2024-02-29T04:29:20 OpenILS::Utils::CStoreEditor /usr/local/share/perl/5.30.0/OpenILS/Utils/CStoreEditor.pm:865 <500> Error in updating a row -- please see the error log for more details\n",
   "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.acq.lineitem.receive.batch shouldn't return 200 OK) or on the Angular client side (similar to what's going on in the purchase order screen, presumably).

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.