Web Client: Call Number Labels should not be required in the Copy Editor

Bug #1821950 reported by Michele Morgan on 2019-03-27
40
This bug affects 7 people
Affects Status Importance Assigned to Milestone
Evergreen
High
Unassigned
3.1
High
Unassigned
3.2
High
Unassigned
3.3
High
Unassigned
3.4
High
Unassigned

Bug Description

It is not possible to create a holding in the web client with a blank call number label. The xul client did allow saving call number records with blank call number labels.

It is common practice for our libraries to use a call number that has only a prefix and a blank label. Our production system has a large number of holdings of this type, and they cannot be created or edited in the web client due to the requirement that the call number label be filled in.

If some feel strongly that call number labels should be required, then there needs to be a library setting to allow the use of blank call number labels.

Elaine Hardy (ehardy) wrote :

I think this should be a setting. Perhaps at the shelving location level, in the Shelving Locations Editor? That would allow finer control so that a library could require call numbers in some collections and not in others.

Changed in evergreen:
status: New → Confirmed
Kyle Huckins (khuckins) on 2019-05-16
Changed in evergreen:
assignee: nobody → Kyle Huckins (khuckins)
Kyle Huckins (khuckins) wrote :

I've pushed a branch here, adding a new YAOUS, and modifying the volcopy editor's behavior to check the setting to determine whether or not to allow items with empty call number label boxes.

https://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/khuckins/lp1821950-call-number-labels-not-required

Changed in evergreen:
assignee: Kyle Huckins (khuckins) → nobody
tags: added: pullrequest
Michele Morgan (mmorgan) on 2019-08-26
Changed in evergreen:
milestone: none → 3.3.4
Derek C. Zoladz (derekz) on 2019-09-05
Changed in evergreen:
assignee: nobody → Derek C. Zoladz (derekz)
Michele Morgan (mmorgan) wrote :

I have done some testing on this patch, and have seen the following problem with cat.require_call_number_labels set to FALSE:

Using Add Holdings to create a new call number and item, if I do nothing to the call number label field, I am unable to save the record and the holdings editor remains open.

In this case, the browser console shows:

error calling method open-ils.cat.asset.volume.fleshed.batch.update.override : 500 : *** Call to [open-ils.cat.asset.volume.fleshed.batch.update.override] failed for session [0.0307549055054026081567543016374], thread trace [0]:
Can't call method "isdeleted" on unblessed reference at /usr/local/share/perl/5.20.2/OpenILS/Application/Cat.pm line 1226.

Possibly unhandled rejection: error calling method open-ils.cat.asset.volume.fleshed.batch.update.override : 500 : *** Call to [open-ils.cat.asset.volume.fleshed.batch.update.override] failed for session [0.0307549055054026081567543016374], thread trace [0]:
Can't call method "isdeleted" on unblessed reference at /usr/local/share/perl/5.20.2/OpenILS/Application/Cat.pm line 1226.

Evergreen logs show:

2019-09-03 17:01:07 brick3 open-ils.cstore: [ERR :60754:oils_sql.c:2522:156754372460501166] open-ils.cstore ERROR inserting asset::call_number object using query [INSERT INTO asset.call_number (create_date,creator,deleted,edit_date,editor,id,label,owning_lib,record,label_sortkey,label_class,prefix,suffix) VALUES ('now',517,DEFAULT,'now',517,DEFAULT,DEFAULT,74,2126522,DEFAULT,2,-1,-1);]: 3452548 3452548: ERROR: query string argument of EXECUTE is null#012CONTEXT: PL/pgSQL function asset.label_normalizer() line 16 at EXECUTE statement

If, however, I enter date in the call number label and then remove it (leaving it blank) I am able to save the new record with the blank label and the holdings editor closes.

Derek C. Zoladz (derekz) on 2019-09-11
Changed in evergreen:
assignee: Derek C. Zoladz (derekz) → nobody
Changed in evergreen:
milestone: 3.3.4 → 3.3.5
Michele Morgan (mmorgan) wrote :

Removing pullrequest and adding needsrepatch tag.

tags: added: needsrepatch
removed: pullrequest
Changed in evergreen:
milestone: 3.3.5 → 3.4.2
Zavier (zavierbanks) wrote :

I believe that I've resolved the bug. Now an empty "owning library" field will disable the save button, and selecting a disabled owning library, will revert the the value back to the old value, instead of being null.

Here's the link to the branch.

https://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/zbanks/lp1821950_call_number_labels_should_not_be_required_in_the_copy_editor

tags: added: pullrequest
Changed in evergreen:
milestone: 3.4.2 → 3.4.3
Terran McCanna (tmccanna) wrote :
Mike Risher (mrisher) wrote :

I made the changes which were requested in this bug (now marked duplicate): https://bugs.launchpad.net/evergreen/+bug/1713164.

Now if the settings require a call number to save, the interface won't let you save without a call number. Also the "Call number missing" label shows up to indicate what's wrong. Branch here:

https://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/mrisher/lp1821950_call_number_missing_behavior

tags: removed: needsrepatch
Changed in evergreen:
milestone: 3.4.3 → 3.4.4
Changed in evergreen:
milestone: 3.4.4 → 3.5.1
Changed in evergreen:
milestone: 3.5.1 → 3.5.2
Michele Morgan (mmorgan) wrote :

I've tested the latest branch on a master test system, and also on a 3.4.3 system with production data.

My tests were not successful on either system, though there were different results.

On the master test system, I was unable to save any items or call numbers, regardless of whether the library setting cat.require_call_number_labels was set to TRUE or FALSE. Attempting to edit an existing call number failed without feedback and attempting to edit an existing item failed, leaving the holdings maintenance screen open.

Attempting to add holdings failed, leaving the holdings maintenance screen open. I didn't have access to logs on the test system.

On the 3.4.3 system with this patch added, I was able to add and save items and call numbers, but when cat.require_call_number_labels was set to FALSE, I was unable to save a call number and item with a blank call number label.

Some log entries from the osrfsys log for one attempt:

open-ils.cstore 2020-08-12 14:44:40 [ERR :6345:oils_sql.c:2522:15972578561312351] open-ils.cstore ERROR inserting asset::call_number object using query [INSERT INTO asset.call_number (create_date,creator,deleted,edit_date,editor,id,label,owning_lib,record,label_sortkey,label_class,prefix,suffix) VALUES ('now',53,DEFAULT,'now',53,DEFAULT,DEFAULT,74,4364045,DEFAULT,2,3123,-1);]: 3452548 3452548: ERROR: query string argument of EXECUTE is null

and corresponding entries from the postgres log:

2020-08-12 14:44:40.711 EDT [6346] evergreen@evergreen ERROR: query string argument of EXECUTE is null

2020-08-12 14:44:40.711 EDT [6346] evergreen@evergreen CONTEXT: PL/pgSQL function asset.label_normalizer() line 16 at EXECUTE

Errors indicate a problem with normalizing the label for the sortkey.

Leaving the pullrequest on for now, hoping for other testers during Feedback Fest.

Jason Etheridge (phasefx) wrote :

I'm seeing the same sort of things as Michele.

master with Concerto data, default settings, log level 4:

Cataloging -> Retrieve Bib Record by ID -> 1
Add Holdings (kept default call number, added barcode, save & exit)

Uncaught exceptions in the dev console:

error calling method open-ils.cat.asset.volume.fleshed.batch.update.override : 500 : *** Call to [open-ils.cat.asset.volume.fleshed.batch.update.override] failed for session [0.98056086217342831597786667395], thread trace [0]:
Can't call method "isdeleted" on unblessed reference at /usr/local/share/perl/5.24.1/OpenILS/Application/Cat.pm line 1236.

net.js:122

Possibly unhandled rejection: error calling method open-ils.cat.asset.volume.fleshed.batch.update.override : 500 : *** Call to [open-ils.cat.asset.volume.fleshed.batch.update.override] failed for session [0.98056086217342831597786667395], thread trace [0]:
Can't call method "isdeleted" on unblessed reference at /usr/local/share/perl/5.24.1/OpenILS/Application/Cat.pm line 1236.

vendor.bundle.js:6:63235
    r https://phasefx2.evergreencatalog.com/js/ui/default/staff/build/js/vendor.bundle.js:6
    get https://phasefx2.evergreencatalog.com/js/ui/default/staff/build/js/vendor.bundle.js:6
    u https://phasefx2.evergreencatalog.com/js/ui/default/staff/build/js/vendor.bundle.js:6
    $digest https://phasefx2.evergreencatalog.com/js/ui/default/staff/build/js/vendor.bundle.js:6
    evalAsync https://phasefx2.evergreencatalog.com/js/ui/default/staff/build/js/vendor.bundle.js:6
    r https://phasefx2.evergreencatalog.com/js/ui/default/staff/build/js/vendor.bundle.js:6
    n https://phasefx2.evergreencatalog.com/js/ui/default/staff/build/js/vendor.bundle.js:6

Nothing obvious in osrfsys.log and postgres log. Last Cat.pm messages were:
vol-update: investigating volume -1
vol-update: creating volume

Terran McCanna (tmccanna) wrote :

Removing pullrequest due to testing comments

tags: removed: pullrequest
Michele Morgan (mmorgan) wrote :

Adding a needsrepatch tag

tags: added: needsrepatch
Kyle Huckins (khuckins) wrote :

Based on Michele's testing, it sounds like the core of the issue might be that whatever function attempts to normalize the callnumber sortkey is unable to handle a null value on the callnumber label - so likely an addition to the existing functionality, rather than an error in the code as it currently stands. My guess is that the normalize functionality expects a bare minimum of having the callnumber label in order to work

Ruth Frasur (rfrasur) wrote :

Based on the original ticket that describes using call number prefixes (and the assumptive suffixes), I attempted to add a copy/item without a Call Number Label using a prefix/suffix. The prefixes/suffixes established in the server admin menu editors are not populating the copy editor.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers