Web client: cannot edit item or call number after mono part assigned

Bug #1739271 reported by Elaine Hardy
90
This bug affects 15 people
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
High
Unassigned
3.0
Fix Released
High
Unassigned

Bug Description

After an item/copy has an assigned monographic parts label, whether at time of cataloging or later, you cannot make changes to item attributes or the call number. You have to remove the label, make the changes, and reaasign the label.

Revision history for this message
Blake GH (bmagic) wrote :

I filed a new bug and found this one later. Here is more information to lead us to a solution:

When editing an existing copy that is already assigned a part using the web based staff client, we are seeing errors in the logs:

open-ils.cstore 2017-12-29 15:02:35 [ERR :734:oils_sql.c:2522:151455963470971582] open-ils.cstore ERROR inserting biblio::monograph_part object using query [INSERT INTO biblio.monograph_part (id,record,label,label_sortkey,deleted) VALUES (DEFAULT,1039176,'2017/11&/12',DEFAULT,DEFAULT);]: 3505685 3505685: ERROR: duplicate key value violates unique constraint "record_label_unique_idx"
DETAIL: Key (record, label)=(1039176, 2017/11&/12) already exists.

[2017-12-29 15:02:35] open-ils.cat [ERR :29061:CStoreEditor.pm:139:151455963470971582] editor[1|10497] request error open-ils.cstore.direct.biblio.monograph_part.create : <new object> : Exception: OpenSRF::DomainObject::oilsMethodException 2017-12-29T15:02:35 OpenILS::Utils::CStoreEditor /usr/local/share/perl/5.22.1/OpenILS/Utils/CStoreEditor.pm:465 <500> INSERT error -- please see the error log for more details

[2017-12-29 15:02:35] open-ils.cat [ERR :29061:EX.pm:66:151455963470971582] Exception: OpenSRF::DomainObject::oilsMethodException 2017-12-29T15:02:35 OpenILS::Utils::CStoreEditor /usr/local/share/perl/5.22.1/OpenILS/Utils/CStoreEditor.pm:478 <500> INSERT error -- please see the error log for more details

[2017-12-29 15:02:35] open-ils.cat [INFO:29061:CStoreEditor.pm:139:151455963470971582] editor[1|10497] request returned no data : open-ils.cstore.direct.biblio.monograph_part.create

It's attempting to create a new part when it needs to just use the one that it already has.

tags: added: webstaffclient
Jason Boyer (jboyer)
Changed in evergreen:
status: New → Confirmed
Revision history for this message
Jason Boyer (jboyer) wrote :

Something I've noticed in playing with the Chrome debugger:
It looks like $scope.updatePart is being called before the parts_list has been built which is why it keeps trying to create new parts; as far as the editor can tell at the time you're adding a new part and when the backend tries to create it on save everything falls down. Forcing the parts list to completely load before loading the item should make this just go away.

Jason Boyer (jboyer)
Changed in evergreen:
importance: Undecided → High
Dan Pearl (dpearl)
Changed in evergreen:
assignee: nobody → Dan Pearl (dpearl)
Revision history for this message
Dan Pearl (dpearl) wrote :
Changed in evergreen:
assignee: Dan Pearl (dpearl) → nobody
tags: added: pullrequest
Revision history for this message
Jason Boyer (jboyer) wrote :

I've had a couple people test Dan's branch and it works as expected. Signoff here: http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/jboyer/lp1739271_edit_items_with_parts_signoff

working/user/jboyer/lp1739271_edit_items_with_parts_signoff

Andrea Neiman (aneiman)
tags: added: signedoff
Revision history for this message
Chris Sharp (chrissharp123) wrote :

Picked to master, rel_3_0, and rel_3_1. Thanks, Dan and Jason!

Changed in evergreen:
status: Confirmed → Fix Committed
milestone: none → 3.0.9
milestone: 3.0.9 → none
Changed in evergreen:
milestone: none → 3.1.3
no longer affects: evergreen/3.1
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.