Bug 9268 - Scanning in barcode or ISBN in Acquisitions -> new order submits the form unexpectedly
Summary: Scanning in barcode or ISBN in Acquisitions -> new order submits the form une...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: 3.8
Hardware: All All
: P5 - low trivial (vote)
Assignee: Liz Rea
QA Contact: Jonathan Druart
URL:
Keywords:
Depends on:
Blocks: 9507
  Show dependency treegraph
 
Reported: 2012-12-11 21:10 UTC by Liz Rea
Modified: 2014-05-26 21:04 UTC (History)
2 users (show)

See Also:
Change sponsored?: Sponsored
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 9268 - Scanning in barcode or ISBN in Acquisitions -> new order submits the form unexpectedly (1.61 KB, patch)
2012-12-11 21:18 UTC, Liz Rea
Details | Diff | Splinter Review
Bug 9268 - Followup - Making it work properly in chrome as well (2.06 KB, patch)
2012-12-12 00:28 UTC, Liz Rea
Details | Diff | Splinter Review
Bug 9268 - Scanning in barcode or ISBN in Acquisitions -> new order submits the form unexpectedly (1.77 KB, patch)
2012-12-12 01:56 UTC, Liz Rea
Details | Diff | Splinter Review
Bug 9268 - Scanning in barcode or ISBN in Acquisitions -> new order submits the form unexpectedly (1.83 KB, patch)
2012-12-13 00:59 UTC, Liz Rea
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 9268 - Scanning in barcode or ISBN in Acquisitions -> new order submits the form unexpectedly (1.96 KB, patch)
2012-12-29 09:34 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 9268 - Scanning in barcode or ISBN in Acquisitions -> new order submits the form unexpectedly (2.04 KB, patch)
2013-01-30 14:12 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Liz Rea 2012-12-11 21:10:00 UTC
Scanning in a barcode or an ISBN number in Acquisitions -> new order submits the form unexpectedly if the scanner sends carriage returns. If the carriage return is sent early, an error message is popped, which can be ignored but it's an extra click and it can be confusing to users. 

To replicate: 

* Go to Acquisitions - Manage Orders
* Search for a vendor 
* Click New Basket. 
* Fill required fields
* Press Save. 
* Click on "From a new (empty) record" 
* Type in title Private Oz, Author Patterson, James. 
* Scan (or type) ISBN - 9781864711875.
* (If not scanning, PRESS ENTER HERE) 
* A box pops up saying 'Form not submitted because of the following problem(s) - you must select budget - Quantity must be greater than '0'.
Comment 1 Jared Camins-Esakov 2012-12-11 21:16:38 UTC
I believe this has been fixed under Firefox but not under Chrome, which propagates the event up through the hierarchy of forms on that page. See bug 8557.
Comment 2 Liz Rea 2012-12-11 21:18:39 UTC Comment hidden (obsolete)
Comment 3 Liz Rea 2012-12-12 00:28:59 UTC Comment hidden (obsolete)
Comment 4 Liz Rea 2012-12-12 00:30:53 UTC
I should add - I haven't quite figured out how to make it work on the barcode entry field (yet) but at least the ISBN box won't cause the problem in chrome anymore.
Comment 5 Liz Rea 2012-12-12 01:56:45 UTC Comment hidden (obsolete)
Comment 6 Liz Rea 2012-12-12 01:57:20 UTC
Never mind! I found a better way to make it work so it works everywhere.
Comment 7 Liz Rea 2012-12-12 22:32:00 UTC
Sponsored by: Hauraki District Libraries, New Zealand
Comment 8 Liz Rea 2012-12-13 00:59:15 UTC Comment hidden (obsolete)
Comment 9 Katrin Fischer 2012-12-29 09:34:25 UTC Comment hidden (obsolete)
Comment 10 Jonathan Druart 2013-01-30 14:12:11 UTC
QA comment:

This patch works as expected.
It would be great to factorize this code (it appears in 3 tt files).

Marked as Passed QA.
Comment 11 Jonathan Druart 2013-01-30 14:12:47 UTC
Created attachment 14946 [details] [review]
Bug 9268 - Scanning in barcode or ISBN in Acquisitions -> new order submits the form unexpectedly

To Test:

* Go to Acquisitions - Manage Orders
* Search for a vendor
* Click New Basket.
* Fill required fields
* Press Save.
* Click on "From a new (empty) record"
* Type in title Private Oz, Author Patterson, James.
* Scan (or type) ISBN - 9781864711875.
* (If not scanning, PRESS ENTER HERE)
* Nothing should happen. Form should not be submitted, no error message should appear.

Sponsored by: Hauraki District Libraries, New Zealand

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tested according to test plan in Firefox and Chromium on Ubuntu.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Comment 12 Jared Camins-Esakov 2013-01-31 16:39:30 UTC
This patch has been pushed to master.
Comment 13 Chris Cormack 2013-02-03 03:01:54 UTC
Pushed to 3.10.x and 3.8.x will be in 3.10.3 and 3.8.10