Self-check only accepts user name value if regex for barcode not set up
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
Fix Released
|
Medium
|
Unassigned | ||
2.10 |
Fix Released
|
Medium
|
Unassigned | ||
2.11 |
Fix Released
|
Medium
|
Unassigned |
Bug Description
When using the self-check interface... if there isn't a regex set up for the patron barcode, the interface appears to only look at the user name field. If the user name is the barcode, then the barcode works, but if the user name is different than the barcode, then only the user name works and not the barcode.
This used to be a problem with the OPAC My Account login too, and a fix for that was created that adds logic so that if the entry starts with a number, then it matches to a barcode and if it doesn't, then it matches to a user name:
https:/
An older related fix using regex was here:
https:/
Evergreen 2.7, 2.9
tags: | added: selfcheck |
Changed in evergreen: | |
assignee: | Terran McCanna (tmccanna) → nobody |
Changed in evergreen: | |
status: | Fix Committed → Fix Released |
I fixed this in my Evergreen instance with the following code. I believe I mimicked the behavior in the OPAC but it's been a while.
Note: I moved Open-ILS/ web/js/ ui/default/ circ/selfcheck/ selfcheck. js to /circ/selfcheck /js/selfcheck. javascript. tt2 in my instance so the paths are a little different.
--- a/circ/ selfcheck/ js/selfcheck. javascript. tt2 selfcheck/ js/selfcheck. javascript. tt2 r.prototype. loadOrgSettings = function() {
this. orgSettings[ k] = settings[k].value;
+++ b/circ/
@@ -292,8 +292,11 @@ SelfCheckManage
}
- if(settings[ SET_BARCODE_ REGEX]) odeRegex = new RegExp( settings[ SET_BARCODE_ REGEX]. value); SET_BARCODE_ REGEX]) { odeRegex = new RegExp( settings[ SET_BARCODE_ REGEX]. value) odeRegex = new RegExp(/^\d/); // To avoid surprises, default to "Barcodes start with digits"
- this.patronBarc
+ if(settings[
+ this.patronBarc
+ } else {
+ this.patronBarc
+ }
if( settings[ SET_PATRON_ TIMEOUT] )
patronTimeout = parseInt( settings[ SET_PATRON_ TIMEOUT] .value) * 1000;