Screens are inconsistent when there is a space within the barcode of items or patrons

Bug #1332651 reported by Steve Callender
28
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Evergreen
Confirmed
Medium
Unassigned
3.4
Won't Fix
Medium
Unassigned
3.5
Won't Fix
Medium
Unassigned

Bug Description

Tested in 2.5 and 2.6

There is some inconsistency when dealing with spaces inside of barcodes.

For example, the registration allows you to use a space in the barcode, (My Barcode) and the F4 search will successfully find it if you search in the barcode field, but when doing a barcode search (F1) or putting in the barcode on the "Retrieve Patron" screen will not work. It looks like these two screens will trim the space out of the barcode causing the search to never be successful.

Item barcodes practically do the opposite. You can search for copies by barcode if they have a space in them (F5), but this moot since the system does not allow you to enter barcodes with spaces in them. In the item creator, it will automatically trim the space off when saving an item. This causes items that truly have spaces in them to fail when scanning in the barcode, since the item wasn't saved with the space.

So it looks like a determination needs to be made to either allow spaces in barcodes (across the board), or disallow them (across the board) because right now the screens behave in a mixed manner.

Steve

Revision history for this message
Erica Rohlfs (erohlfs) wrote :

Confirming this in Evergreen Version 2.9.

Changed in evergreen:
status: New → Confirmed
Revision history for this message
Michele Morgan (mmorgan) wrote :

I would be in favor of disallowing spaces in barcodes across the board and having all barcode input boxes, including the barcode search box in the opac, strip any spaces that may be entered.

If there are legitimate cases where patron or item barcodes must be recorded with spaces, I would like to see an option to disallow spaces across the board.

For evergreen installations that don't have a need to allow spaces in barcodes, the ability to disallow them entirely would avoid many headaches caused by inadvertently introducing a space when checking in items, or searching for items and patrons by barcode.

Revision history for this message
Galen Charlton (gmc) wrote :

There is at least one legacy system out there that includes interstitial spaces in barcode values (e.g., "T 123", "P 456", etc.). This is of course wrong and bad and terrible... but alas is a thing.

Consequently, while I would be in favor of a mode in Evergreen that strictly forbids spaces in barcodes and ignores them in barcode input widgets, I do not think it should be hardcoded.

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

Just FYI:
Newer versions of Evergreen remove ALL spaces within the patron barcode. See related bug 1692986. IRC Discussion:
http://irc.evergreen-ils.org/evergreen/2018-12-10#i_387641

Revision history for this message
Rogan Hamby (rogan-hamby) wrote :

As a note the update from 2018 is no longer accurate. Angular patron search does not remove included spaces.

Changed in evergreen:
importance: Undecided → Medium
assignee: nobody → Rogan Hamby (rogan-hamby)
Revision history for this message
Rogan Hamby (rogan-hamby) wrote :

currently for the staff client this is what I'm finding:

- patron search does not strip spaces
- checkout retrieve patron by barcode strips included space
- user permission does not strip included spaces
- angular item status does not strip out spaces
- item check in does not strip out spaces
- item check out does not strip spaces

So, thanks to the angular work the only thing I'm seeing right now is the patron retrieval in the checkout screen which this patches addresses:

user/rogan/lp1332651_consistent_barcode_spaces

99504184971c4f65b168eb8675c2c6f590d68a20

Changed in evergreen:
assignee: Rogan Hamby (rogan-hamby) → nobody
tags: added: pullrequest
tags: added: webstaffclient
Revision history for this message
Jason Etheridge (phasefx) wrote :

I added a commit message and changed a tab to spaces and pushed this to master. Thanks!

Changed in evergreen:
status: Confirmed → Fix Committed
Revision history for this message
Jason Etheridge (phasefx) wrote :

oops, same day, bug 1819367 added some whitespace stripping to Item Status, but was mirroring the whitespace stripping of the Upload File option for Item Status that we overlooked

Revision history for this message
Jason Etheridge (phasefx) wrote :
Revision history for this message
Galen Charlton (gmc) wrote :

Tacking on new patches to a fix committed bug will obscure discoverability, at least for my workflow, which used canned LP queries that exclude fix-committed bugs. I'm see this only because saw the fix in the msater and wanted to check where it had been backported to.

Revision history for this message
Galen Charlton (gmc) wrote :

I'll sort this out.

Changed in evergreen:
assignee: nobody → Galen Charlton (gmc)
milestone: none → 3.5.2
Galen Charlton (gmc)
Changed in evergreen:
status: Fix Committed → Confirmed
assignee: Galen Charlton (gmc) → nobody
Revision history for this message
Galen Charlton (gmc) wrote :

I ended up pushing a revert of Rogan's commit - not because of any problem with the patch itself, but because at the moment there's a bit more to the inconsistency that I think needs to be discussed first.

One issue is that OPAC login currently _always_ strips internal spaces per bug 1086064. That's a pretty big inconsistency, and means that staff interfaces that allow internal spaces in patron barcodes (which barcodes, per my comment #3, do exist) could allow registering patrons who cannot log in.

Another issue I ran across while testing this is that open-ils.search.multi_home.bib_ids.by_barcode doesn't remove any spaces at all, when it should at least remove leading and trailing whitespace.

Consequently, in the interests of fixing this once and for all, comprehensively, I suggest the following:

- all APIs that do patron or item barcode searches always strip leading and trailing whitespace
- all clients that collect patron and item barcodes for submission lookup APIs also strip leading and trailing whitespace
- item and patron retrieval by barcode, including for authentication, should get two bites at the apple: if internal spaces were supplied, first try to retrieve the record with spaces intact. If that fails, redo the search but without internal spaces.
- consider also allowing two bites at the apple for usernames when logging in
- add a library setting to specify whether internal spaces should be stripped upon saving a patron barcode to supplement ui.patron.edit.ac.barcode.regex
- add a library setting to specify whether internal spaces should be stripped upon saving an item barcode
- add a report to warn about cases where there's a collision between barcode values with and without spaces.

tags: removed: pullrequest
tags: added: needsdiscussion
Changed in evergreen:
milestone: 3.5.2 → 3.6.1
Changed in evergreen:
milestone: 3.6.1 → 3.6.2
Revision history for this message
Terran McCanna (tmccanna) wrote :

+1 to Galen's suggested plan of attack in comment #12.

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

Removing milestone targets because pullrequest tag was removed and bug is tagged needsdicussion.

Changed in evergreen:
milestone: 3.6.3 → none
tags: added: usability
removed: webstaffclient
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.