Bug 31253 - Item search in staff interface should call barcodedecode if the search index is a barcode
Summary: Item search in staff interface should call barcodedecode if the search index ...
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor (vote)
Assignee: Kyle M Hall
QA Contact: Testopia
URL:
Keywords:
Depends on: 26351
Blocks:
  Show dependency treegraph
 
Reported: 2022-07-28 13:12 UTC by Kyle M Hall
Modified: 2023-12-28 20:47 UTC (History)
2 users (show)

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


Attachments
Bug 31253 - Item search in staff interface should call barcodedecode if the search index is a barcode (1.70 KB, patch)
2022-07-28 13:15 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 31253 - Item search in staff interface should call barcodedecode if the search index is a barcode (1.75 KB, patch)
2023-06-30 16:42 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 31253: Item search in staff interface should call barcodedecode if the search index is a barcode (1.89 KB, patch)
2023-07-03 12:52 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle M Hall 2022-07-28 13:12:33 UTC
We should run any inputted barcode through barcodedecode before passing it to any subroutines. This was missed during the initial development of bug 26351.
Comment 1 Kyle M Hall 2022-07-28 13:15:53 UTC
Created attachment 138205 [details] [review]
Bug 31253 - Item 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) Create an item with the barcode "MYTEST"
3) Browse to the staff side advanced search
4) Run a barcode search for "MY TEST"
5) Note no results are round
6) Apply this patch
7) Restart all the things!
8) Repeat your search
9) Note the item was found!
Comment 2 Owen Leonard 2022-08-03 18:22:52 UTC
Is this specific to the search engine?
Comment 3 Rachael 2022-08-03 19:38:57 UTC
Searching for MY TEST returns no results
Comment 4 Katrin Fischer 2022-08-21 22:11:47 UTC
(In reply to Owen Leonard from comment #2)
> Is this specific to the search engine?

It should not be. It changes the search term that is used. Also item search is SQL based.
Comment 5 Emmanuel Bétemps 2022-09-02 09:34:32 UTC
No results match your search for 'bc,wrdl: "MY TEST"'.
Comment 6 Kyle M Hall 2023-06-30 13:43:30 UTC
(In reply to Emmanuel Bétemps from comment #5)
> No results match your search for 'bc,wrdl: "MY TEST"'.

That is not a valid test. This patch is about item searching ( itemsearch.pl )
Comment 7 ByWater Sandboxes 2023-06-30 16:42:02 UTC
Created attachment 152909 [details] [review]
Bug 31253 - Item 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) Create an item with the barcode "MYTEST"
3) Browse to the staff side advanced search
4) Run a barcode search for "MY TEST"
5) Note no results are round
6) Apply this patch
7) Restart all the things!
8) Repeat your search
9) Note the item was found!

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Comment 8 Tomás Cohen Arazi 2023-07-03 12:52:08 UTC
Created attachment 152937 [details] [review]
Bug 31253: Item 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) Create an item with the barcode "MYTEST"
3) Browse to the staff side advanced search
4) Run a barcode search for "MY TEST"
5) Note no results are round
6) Apply this patch
7) Restart all the things!
8) Repeat your search
9) Note the item was found!

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Edit: fixed typo in comment
Comment 9 Tomás Cohen Arazi 2023-07-03 13:34:36 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 10 Martin Renvoize 2023-07-17 15:00:06 UTC
Thanks for all the hard work!

Pushed to 23.05.x for the next release
Comment 11 Pedro Amorim 2023-07-18 11:54:17 UTC
Nice work everyone!

Pushed to 22.11.x for next release