Applying template with non-existent call number prefix/suffix results in uncataloged item

Bug #1253732 reported by Michele Morgan on 2013-11-21
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Evergreen
Undecided
Unassigned

Bug Description

Evergreen 2.3.7

This bug is related to https://bugs.launchpad.net/evergreen/+bug/1040686 in that creation of the new call_number record is part of the problem described here.

Here's the manifestation of this bug:

The user opens an existing item in the unified editor, chooses a template and applies it, then clicks the button to "Re-barcode / Update Items".

The user finds that their holding disappears from the bib record, and the item, which can still be retrieved by barcode, is uncataloged.

The problem is a defunct call number prefix or suffix designation stored in the template, so the unified editor attempted to create a new call_number record with a prefix or suffix that does not exist in the database.

In its attempt to run through its chain of envents, the unified editor successfully deleted the old call_number, but did not successfully create the new call_number. Despite the failure to create the new call_number, it attempted to move the item to the non-existent call_number record, resulting in the uncataloged item.

Here are some entries from the server logs showing failure to create the call_number record:

2013-04-30 08:09:28 app101 open-ils.cat: [INFO:19718:CStoreEditor.pm:110:136728480220575129] editor[1|214] created a new asset.call_number object with Identity 6413357

2013-04-30 08:09:28 app101 open-ils.cstore: [ERR :10142:oils_sql.c:1124:136728480220575129] open-ils.cstore: Error committing transaction: 0 ERROR: insert or update on table "call_number" violates foreign key constraint "call_number_suffix_fkey"#012DETAIL:
 Key (suffix)=(2404) is not present in table "call_number_suffix".

Note that asset.call_number.id 6413357 does NOT exist in our database.

Michele Morgan (mmorgan) wrote :

An update on this:

Our system is now running release 2.4.4 and this is problem still exists.

Michele Morgan (mmorgan) wrote :

This is still a problem in Evergreen 2.6. Below are screen captures of the series errors that occur in the client when saving the copy in the unified editor, after applying a template that contains reference to a deleted prefix:

http://screencast.com/t/nw9cU4gOE

http://screencast.com/t/sJlTrprYSoY

http://screencast.com/t/5OfAcAWv

Andrea Neiman (aneiman) wrote :

2.12-beta -- not able to reproduce this.

Michele Morgan (mmorgan) wrote :

I am still able to reproduce this in the 2.12.2 xul client as follows:

- Go to Admin - Server Admin - Call Number Prefixes and add a test prefix
- Exit the client and relaunch
- Retrieve an item in item status, under Actions - Edit Items/Volumes per bib
- Choose the test prefix in the Batch call number dropdown and Save a test copy template.
- Go to Admin - Server Admin - Call Number Prefixes and delete the test prefix
- Exit the client and relaunch
- Retrieve an item in item status, under Actions - Edit Items/Volumes per bib apply the test copy template, click Re-barcode/Update Items

At this point, the errors will appear. Clicking through and retrieving the item in item status will show it as uncataloged.

I have not tested enough in the web client to determine if it's a problem there.

Andrea Neiman (aneiman) wrote :

I can't reproduce this in the webclient -- marking as fixedinwebby, however as there is some hairiness around templates in the webclient, I'll hold off on "Won't Fix" unless someone else tests.

tags: added: fixedinwebby
Michele Morgan (mmorgan) on 2019-09-13
Changed in evergreen:
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers