Barcodes should be case insensitive

Bug #1869896 reported by Benjamin Kalish
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Evergreen
New
Wishlist
Unassigned

Bug Description

It would save some time and trouble at many libraries if barcodes were case insensitive.

This should, of course, be controlled by a setting, so as not to break any systems which actually have barcodes that differ only in capitalization. But I suspect that isn't many systems.

See also https://bugs.launchpad.net/evergreen/+bug/1744153

Revision history for this message
Jason Stephenson (jstephenson) wrote :

Here's a query that will identify patron barcodes that are duplicates, except for case.

select a.usr, a.id, a.barcode, b.usr, b.id, b.barcode
from actor.card a
join actor.card b
on lower(a.barcode) = lower(b.barcode)

We have over a hundred of these. Several belong to the same user.

And, here's one for copy barcodes:

select a.id, a.barcode, b.id, b.barcode
from asset.copy a
join asset.copy b
on lower(a.barcode) = lower(b.barcode)
and b.id > a.id
and not a.deleted and not b.deleted;

We have even more of these, over 600 rows returned.

and a.id < b.id;

Revision history for this message
Jason Stephenson (jstephenson) wrote :

Oops! Looks like my first query got chopped up. It should be:

select a.usr, a.id, a.barcode, b.usr, b.id, b.barcode
from actor.card a
join actor.card b
on lower(a.barcode) = lower(b.barcode)
and a.id < b.id;

Changed in evergreen:
importance: Undecided → Wishlist
tags: added: orgunitsettings
Revision history for this message
Josh Stompro (u-launchpad-stompro-org) wrote :

Postgres has an included module called citext that may be useful if we move forward with this.
https://www.postgresql.org/docs/13/citext.html

But I think that would make it a non optional features.

I found a few patron barcodes that were conflicting, but they are all examples of situations that shouldn't be allowed anyway, or work arounds.

No copy barcodes in our system that differ only in case.

On my 3.11.0 test system there are two index entries for actor.card(barcode).

    "actor_card_barcode_evergreen_lowercase_idx" btree (lowercase(barcode))
    "card_barcode_key" UNIQUE CONSTRAINT, btree (barcode)

We have added student cards recently, that use a school district alpha prefix, so it is a bit of a pain that students need to always enter the prefix in caps for it to work.

ABCD4567 not being equal to abcd4567.

Josh

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

Adding links to a couple related bugs:

bug 1581658 - OPAC: Barcode that starts with a letter cannot login to My Account

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

The latter addresses spaces rather than case, but the discussion is relevant.

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.