Holdings Editor does pcrud lookup on any barcode change

Bug #1929136 reported by Jeff Davis
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Low
Unassigned
3.6
Fix Released
Low
Unassigned

Bug Description

EG 3.7/master

1. In the staff client, retrieve a bib record.
2. Go to Holdings View and click on Add Holdings. (Alternatively, edit existing holdings and click Show Holdings Details so the barcode field is displayed.)
3. Type some characters in the barcode field.

The client will immediately do a separate open-ils.pcrud.search.acp call on each change to the barcode field. In other words, if you type the barcode "123456789", you will get 9 separate acp pcrud searches: 1, 12, 123, 1234, 12345, ...

To avoid excessive pcrud calls, these lookups should only happen when focus leaves the barcode field, or else after a short timeout.

Revision history for this message
Jeff Davis (jdavis-sitka) wrote :

Working branch user/jeffdavis/lp1929136-holdings-editor-delay-barcode-lookup adds a 1000ms delay before doing the lookup:

https://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/jeffdavis/lp1929136-holdings-editor-delay-barcode-lookup

I think only doing the pcrud call on change of focus would be better, but I'm not sure if there would be unwanted side-effects. We could also make the delay longer.

tags: added: pullrequest
tags: added: parallel-requests
Revision history for this message
Galen Charlton (gmc) wrote :

Signoff pushed to working/user/gmcharlt/lp1929136_signoff. The signoff branch includes a proposed follow-up patch that reduces the debounce interval from 1000ms to 500ms. 500ms seems enough to avoid excessive PCRUD calls if somebody is manually typing a barcode while still having the duplicate and missing barcode warnings appear and disappear responsively.

Changed in evergreen:
milestone: none → 3.7.1
status: New → Confirmed
importance: Undecided → Low
tags: added: signedoff
Changed in evergreen:
milestone: 3.7.1 → 3.7.2
Revision history for this message
Galen Charlton (gmc) wrote :

As a month has passed without comment, I've pushed the patch and my follow-up to master, rel_3_7, and rel_3_6. Thanks, Jeff!

Changed in evergreen:
status: Confirmed → Fix Committed
Changed in evergreen:
status: Fix Committed → Fix Released
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.