When you copy a barcode from somewhere else, sometimes there is whitespace at the beginning or the end. The checkout tab ignores this, the renew tab should as well. If you enter " validbarcode" the barcode is not found at the moment.
Created attachment 83918 [details] [review] Bug 17347: Ignore whitespace before and after on renewing When an item is checked out, Koha ignores whitespace at the beginning and the end of the entered barcode. This makes life easier, if a barcode is C&P from another page. This patch makes the renewal page behave the same. To test: - Checkout an item - Renew the item from the renew tab or renewal page entering the barcode with leading and trailing whitespace - "Barcode not found" - Apply patch - Try again - Barcode should be found now
Created attachment 83988 [details] [review] Bug 17347: Ignore whitespace before and after on renewing When an item is checked out, Koha ignores whitespace at the beginning and the end of the entered barcode. This makes life easier, if a barcode is C&P from another page. This patch makes the renewal page behave the same. To test: - Checkout an item - Renew the item from the renew tab or renewal page entering the barcode with leading and trailing whitespace - "Barcode not found" - Apply patch - Try again - Barcode should be found now Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Created attachment 84151 [details] [review] Bug 17347: Ignore whitespace before and after on renewing When an item is checked out, Koha ignores whitespace at the beginning and the end of the entered barcode. This makes life easier, if a barcode is C&P from another page. This patch makes the renewal page behave the same. To test: - Checkout an item - Renew the item from the renew tab or renewal page entering the barcode with leading and trailing whitespace - "Barcode not found" - Apply patch - Try again - Barcode should be found now Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Devinim <kohadevinim@devinim.com.tr>
Hi Katrin, Good patch, Thanks. We tried to give a blank in the box, then press Tab, go back to the box again and paste the barcode, in that case it did not recognize the barcode since there is a Tab. Thanks Devinim Koha Team
Hi Devinim, could you test the same in circ please? I used the same regex that is used there. I was aiming to make them behave the same.
Created attachment 84882 [details] [review] Bug 17347: Ignore whitespace before and after on renewing When an item is checked out, Koha ignores whitespace at the beginning and the end of the entered barcode. This makes life easier, if a barcode is C&P from another page. This patch makes the renewal page behave the same. To test: - Checkout an item - Renew the item from the renew tab or renewal page entering the barcode with leading and trailing whitespace - "Barcode not found" - Apply patch - Try again - Barcode should be found now Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Devinim <kohadevinim@devinim.com.tr> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Another trivial but helpful patch which introduces no regressions.. Passing QA
Awesome work all! Pushed to master for 19.05
Pushed to 18.11.x for 18.11.03
backported to 18.05.x for 18.05.09
Pushed to 17.11.x for 17.11.15