[Bug 13415] New: Prevent librarians from scanning multiple items into a single barcode field
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13415 Bug ID: 13415 Summary: Prevent librarians from scanning multiple items into a single barcode field Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Circulation Assignee: koha-bugs@lists.koha-community.org Reporter: kyle@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com It appears that some librarians will attempt to scan items as fast as they can without checking to make sure the checkout was submitted and the page reloaded properly. This can cause multiple barcodes to be scanned into the barcode field if the person is fast enough. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13415 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |kyle@bywatersolutions.com |ity.org | Severity|enhancement |minor -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13415 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13415 --- Comment #1 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 34202 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=34202&action=edit Bug 13415 - Prevent librarians from scanning multiple items into a single barcode field It appears that some librarians will attempt to scan items as fast as they can without checking to make sure the checkout was submitted and the page reloaded properly. This can cause multiple barcodes to be scanned into the barcode field if the person is fast enough. This causes the checkout of both ( or more! ) items to fail. Test Plan: 1) Apply this patch 2) Attempt to scan two or more items into the barcode field You can emulate this with a keybaord by hitting a few keys, then enter, then a few more keys, then enter again. The barcodes don't need to be valid for this test. 3) Note the dialog stating the barcode has been submitted and to please wait. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13415 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #34202|0 |1 is obsolete| | --- Comment #2 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 34203 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=34203&action=edit Bug 13415 - Prevent librarians from scanning multiple items into a single barcode field It appears that some librarians will attempt to scan items as fast as they can without checking to make sure the checkout was submitted and the page reloaded properly. This can cause multiple barcodes to be scanned into the barcode field if the person is fast enough. This causes the checkout of both ( or more! ) items to fail. Test Plan: 1) Apply this patch 2) Attempt to scan two or more items into the barcode field You can emulate this with a keybaord by hitting a few keys, then enter, then a few more keys, then enter again. The barcodes don't need to be valid for this test. 3) Note the dialog stating the barcode has been submitted and to please wait. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13415 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13415 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #34203|0 |1 is obsolete| | --- Comment #3 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 34235 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=34235&action=edit [SIGNED OFF] Bug 13415 - Prevent librarians from scanning multiple items into a single barcode field It appears that some librarians will attempt to scan items as fast as they can without checking to make sure the checkout was submitted and the page reloaded properly. This can cause multiple barcodes to be scanned into the barcode field if the person is fast enough. This causes the checkout of both ( or more! ) items to fail. Test Plan: 1) Apply this patch 2) Attempt to scan two or more items into the barcode field You can emulate this with a keybaord by hitting a few keys, then enter, then a few more keys, then enter again. The barcodes don't need to be valid for this test. 3) Note the dialog stating the barcode has been submitted and to please wait. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13415 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com --- Comment #4 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Works well for me, and code looks fine. Signing Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13415 --- Comment #5 from Owen Leonard <oleonard@myacpl.org> --- - [% IF NEEDSCONFIRMATION %] <input type="text" name="barcode" id="barcode" class="barcode focus" size="14" disabled="disabled" /> - [% ELSE %] - <input type="text" name="barcode" id="barcode" class="barcode focus" size="14" /> - [% END %] This change means that all circulation transactions must wait until document.ready() fires. Is this what we want? + $('#mainform').bind('submit',function() { + $('#barcode').on('keypress',function(event) { Is there a reason to use bind() on #mainform instead of on()? "As of jQuery 1.7, the .on() method is the preferred method for attaching event handlers to a document." https://api.jquery.com/bind/ -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13415 --- Comment #6 from Kyle M Hall <kyle@bywatersolutions.com> --- I agree, I think I was a bit too aggressive. There is really no need to prevent a barcode from being scanned before the page loads completely. I'll also change the bind to on, as you are correct about that as well. (In reply to Owen Leonard from comment #5)
- [% IF NEEDSCONFIRMATION %] <input type="text" name="barcode" id="barcode" class="barcode focus" size="14" disabled="disabled" /> - [% ELSE %] - <input type="text" name="barcode" id="barcode" class="barcode focus" size="14" /> - [% END %]
This change means that all circulation transactions must wait until document.ready() fires. Is this what we want?
+ $('#mainform').bind('submit',function() { + $('#barcode').on('keypress',function(event) {
Is there a reason to use bind() on #mainform instead of on()? "As of jQuery 1.7, the .on() method is the preferred method for attaching event handlers to a document." https://api.jquery.com/bind/
-- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13415 --- Comment #7 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 34341 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=34341&action=edit Bug 13415 [QA Followup] - Change bind to on, revert barcode disable -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13415 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13415 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #34235|0 |1 is obsolete| | Attachment #34341|0 |1 is obsolete| | --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 34380 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=34380&action=edit [PASSED QA] Bug 13415 - Prevent librarians from scanning multiple items into a single barcode field It appears that some librarians will attempt to scan items as fast as they can without checking to make sure the checkout was submitted and the page reloaded properly. This can cause multiple barcodes to be scanned into the barcode field if the person is fast enough. This causes the checkout of both ( or more! ) items to fail. Test Plan: 1) Apply this patch 2) Attempt to scan two or more items into the barcode field You can emulate this with a keybaord by hitting a few keys, then enter, then a few more keys, then enter again. The barcodes don't need to be valid for this test. 3) Note the dialog stating the barcode has been submitted and to please wait. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13415 --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 34381 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=34381&action=edit [PASSED QA] Bug 13415 [QA Followup] - Change bind to on, revert barcode disable Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Tested according to test plan, passes tests and QA script. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13415 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |tomascohen@gmail.com --- Comment #10 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Patch pushed to master. Thanks Kyle! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13415 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |chris@bigballofwax.co.nz --- Comment #11 from Chris Cormack <chris@bigballofwax.co.nz> --- Template changes held for 3.18.3 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13415 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable --- Comment #12 from Chris Cormack <chris@bigballofwax.co.nz> --- Pushed to 3.18.x is 3.18.3 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13415 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=14011 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org