Bug 30985 - Refine search doesn't work when item types contain same string (eg BK & BK-E)
Summary: Refine search doesn't work when item types contain same string (eg BK & BK-E)
Status: CLOSED INVALID
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching (show other bugs)
Version: 21.11
Hardware: All Linux
: P5 - low normal
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-06-17 12:09 UTC by r-mcilwain
Modified: 2023-06-08 22:26 UTC (History)
0 users

See Also:
GIT URL:
Initiative type: ---
Sponsorship status: ---
Comma delimited list of Sponsors:
Crowdfunding goal: 0
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description r-mcilwain 2022-06-17 12:09:17 UTC
When trying to a refine search for books only (no ebooks), I noticed nothing was happening; I was still geting all books AND ebooks. Upon further inspection I realized that the authorized values for books was BK and eBooks was BK-E. I realized that Koha was probably simply not being very strict when narrowing results by item type and was returning BK and BK-E because they both contained the string 'BK'.

I tested whether this was the case with other item types and didn't have an issue. I then tested by creating a new item type with authorized value EPUB and manually switched some BK-E records to the new item type (both 942$c and 952$y) and that resolved the issue.
Comment 1 Katrin Fischer 2022-06-17 13:18:38 UTC
That's because - is treated as a space. So the search for BK is ALSO a search for  BK E. This has been reported often, but is actually more of a configuration issue. It's recommended to not use spaces or hyphens in your itemtype, collection and location codes.