Bug 37889 - Item search: collection search doesn’t work correctly when searching 'collection is not'
Summary: Item search: collection search doesn’t work correctly when searching 'collect...
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low new feature
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-09-11 07:39 UTC by Kati Sillgren
Modified: 2025-03-17 11:21 UTC (History)
1 user (show)

See Also:
GIT URL:
Change sponsored?: ---
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 Kati Sillgren 2024-09-11 07:39:03 UTC
itemsearch.pl

Item search and searching 'collection is not' does not take into account items that do not have a collection code.

Not all items have a collection code.
Comment 1 Katariina Pohto 2025-03-17 11:21:50 UTC
This seems to happen with some other values that can be NULL. In the drop down menu with the barcode placeholder there can be several different options working the same way, for example age restriction or series. If you search items while selecting these as "is not", the results will not include the items that have a NULL value.

It seems to be the way SQL works. Even reports will not give you the NULL results if you search for items with (CCODE != collection) but you can circumvent it using (CCODE IS NULL OR CCODE !=CCODE). This is how our librarians think it should work in item search.

(And if we changed this logic it would still be possible to do the CCODE search the way it was, by selecting 'Collection IS' and making the multiple choice of all the collections but the ones excluded.)