Bug 31252: Advanced search in staff interface should call barcodedecode if the search...
authorKyle Hall <kyle@bywatersolutions.com>
Thu, 28 Jul 2022 12:35:33 +0000 (08:35 -0400)
committerTomas Cohen Arazi <tomascohen@theke.io>
Mon, 17 Oct 2022 18:10:22 +0000 (15:10 -0300)
commite7a647e475999098573f242c6ddf1eec47d21d52
treed2cfb77715be3c9b23fea81c9f2d4015d451d153
parenta5775a68b92e05eae9dd576ad9dbd2cff698a907
Bug 31252: Advanced search in staff interface should call barcodedecode if the search index is a barcode

We should run any inputted barcode through barcodedecode before passing it to any subroutines.
This was missed during the initial development of bug 26351.

Test Plan:
1) Set itemBarcodeInputFilter to "Remove spaces from"
2) Browse to the staff side advanced search
3) Run a barcode search for "MY TEST"
4) Note the message returned is:
   No results match your search for 'bc,wrdl: "MY TEST"'.
5) Apply this patch
6) Restart all the things!
7) Repeat your search
8) Note the message returned is:
   No results match your search for 'bc,wrdl: "MYTEST"'.
9) Note the lack of the space between MY and TEST!

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
catalogue/search.pl