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

Bug #1821950 reported by Michele Morgan
30
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Evergreen
Confirmed
Wishlist
Michele Morgan

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.

Revision history for this message
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)
Changed in evergreen:
assignee: nobody → Kyle Huckins (khuckins)
Revision history for this message
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)
Changed in evergreen:
milestone: none → 3.3.4
Derek C. Zoladz (derekz)
Changed in evergreen:
assignee: nobody → Derek C. Zoladz (derekz)
Revision history for this message
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)
Changed in evergreen:
assignee: Derek C. Zoladz (derekz) → nobody
Changed in evergreen:
milestone: 3.3.4 → 3.3.5
Revision history for this message
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
Revision history for this message
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
Revision history for this message
Terran McCanna (tmccanna) wrote :
Revision history for this message
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
Revision history for this message
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.

Revision history for this message
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

Revision history for this message
Terran McCanna (tmccanna) wrote :

Removing pullrequest due to testing comments

tags: removed: pullrequest
Revision history for this message
Michele Morgan (mmorgan) wrote :

Adding a needsrepatch tag

tags: added: needsrepatch
Revision history for this message
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

Revision history for this message
Ruth Frasur Davis (redavis) 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.

Changed in evergreen:
milestone: 3.5.2 → 3.6.1
Changed in evergreen:
milestone: 3.6.1 → 3.6.2
Changed in evergreen:
milestone: 3.6.2 → 3.6.3
Revision history for this message
Evergreen Bug Maintenance (bugmaster) wrote :

Removing milestone targets because the bug is tagged needsrepatch.

Changed in evergreen:
milestone: 3.6.3 → none
tags: removed: webstaffclient
tags: added: needswork
removed: needsrepatch
Revision history for this message
Christine Morgan (cmorgan-z) wrote :

This is also an issue in the Angular Holdings Editor.
https://bugs.launchpad.net/evergreen/+bug/1980409

tags: added: regression
Revision history for this message
Terran McCanna (tmccanna) wrote :
tags: added: pullrequest
removed: needswork
Revision history for this message
Beth Willis (willis-a) wrote :

Test server: https://terran-master.gapines.org/

I have tested this code in the traditional catalog with the library setting "Require call number labels in Copy Editor" set to false. It is working as expected. I was able to add holdings with blank call numbers, with and without call number prefixes. I also was able to edit existing holdings to blank out their call numbers and was able to save the holdings.

I have tested this code and consent to signing off on it with my name, Beth Willis and my email address, <email address hidden>.

tags: added: signedoff
Changed in evergreen:
milestone: none → 3.10-beta
Revision history for this message
Galen Charlton (gmc) wrote :

Marking this as wishlist since per the dev meeting today it's on the 3.10 roadmap, but please speak up if there's a strong desire to have it backported to (say) 3.9.2.

Changed in evergreen:
importance: High → Wishlist
no longer affects: evergreen/3.1
no longer affects: evergreen/3.2
no longer affects: evergreen/3.4
no longer affects: evergreen/3.3
no longer affects: evergreen/3.5
Revision history for this message
Michele Morgan (mmorgan) wrote :

I'd be strongly in favor of backporting this to 3.9 (and 3.8) since this functionality existed way back in the xul client.

Michele Morgan (mmorgan)
Changed in evergreen:
assignee: nobody → Michele Morgan (mmorgan)
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.