Null circ_modifier causes "Network or server failure" error

Bug #623458 reported by Ben Ostrowsky
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Low
Jason Etheridge

Bug Description

Reported in Evergreen 1.6.0.7:

Attempting to save a copy with a null circ_modifier results in a message like the following:

Network or server failure. Please check your Internet connection to [app server] and choose Retry Network. If you need to enter Offline Mode, choose Ignore Errors in this and subsequent dialogs. If you believe this error is due to a bug in Evergreen and not network problems, please contact your help desk or friendly Evergreen administrators, and give them this information:
method=open-ils.cat.asset.copy.fleshed.batch.update
params=["[authtoken]",[{"__c":"acp","__p":[[{"__c":"asce","__p":["53","1","5","Adult"]},{"__c":"asce","__p":["31","1","3","Book-Print"]},{"__c":"asce","__p":["41","1","4","Book"]},{"__c":"asce","__p":["60","1","6","Nonfiction"]}],"1",null,"52111100192865","1058035",null,"773","undefined","t","1",null,null,null,0,0,null,null,null,null,"2","t",-1,"2","225","t","24.95","f",5,null,null,null,null,null,"1","1"]}],true]
THROWN:
{"payload":[],"debug":"osrfMethodException : *** Call to [open-ils.cat.asset.copy.fleshed.batch.update] failed for session [1282572485.364872.128257248531816], thread trace [1]:\nException: OpenSRF::DomainObject::oilsMethodException 2010-08-23T10:08:06 OpenSRF::Application /usr/local/share/perl/5.10.0/OpenSRF/Application.pm:202 <500> Error committing transaction\n\n","status":500}

Postgres logs show the underlying problem:

2010-08-23 10:08:06 [db server] postgres[2182]: [172-1] 2010-08-23 10:08:06 EDT ERROR: insert or update on table "copy" violates foreign key constraint "circ_mod_fkey"
2010-08-23 10:08:06 [db server] postgres[2182]: [172-2] 2010-08-23 10:08:06 EDT DETAIL: Key (circ_modifier)=(undefined) is not present in table "circ_modifier".
2010-08-23 10:08:06 [db server] postgres[2182]: [172-3] 2010-08-23 10:08:06 EDT STATEMENT: COMMIT;

Desired behavior: It should be possible to have a null circ_modifier. If it weren't possible to have a null circ_modifier, I would want the staff client to say "circ_modifier cannot be null. Please assign a circ_modifier before saving this copy." rather than throwing a "Network or server failure" error that doesn't even hint at the problem.

Ben Ostrowsky (sylvar)
description: updated
Revision history for this message
Ben Ostrowsky (sylvar) wrote :

Steps to reproduce:

1. Open the drop down box for Circulation Modifier
2. Do not select one of the options and leave it as 'undefined'
3. Click Apply
4. Click Create Copies

Revision history for this message
James Fournie (jfournie) wrote :

Confirmed on 1.6.1.2

Changed in evergreen:
status: New → Confirmed
importance: Undecided → Low
Changed in evergreen:
milestone: none → 1.6.1.5
Changed in evergreen:
assignee: nobody → Jason Etheridge (phasefx)
Revision history for this message
Jason Etheridge (phasefx) wrote :

Backported r14033 from way back when. :-)

http://svn.open-ils.org/trac/ILS/changeset/18970
http://svn.open-ils.org/trac/ILS/changeset/18971
http://svn.open-ils.org/trac/ILS/changeset/18972

This does change the widget so that it's no longer an editable drop-down menu allowing freetext entry of madeup circ modifiers, which is probably desirable even for older Evergreen's without a dedicated circ mod table.

Changed in evergreen:
status: Confirmed → Fix Committed
Dan Scott (denials)
Changed in evergreen:
status: Fix Committed → Fix Released
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.