Bug 39011 - Unable to search the holdings table (except home/holding libraries and barcode)
Summary: Unable to search the holdings table (except home/holding libraries and barcode)
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Staff interface (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low normal
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on: 33568
Blocks:
  Show dependency treegraph
 
Reported: 2025-01-31 20:03 UTC by Caroline Cyr La Rose
Modified: 2025-01-31 20:59 UTC (History)
1 user (show)

See Also:
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 Caroline Cyr La Rose 2025-01-31 20:03:09 UTC
When using the search box in the holdings tab on a record details page in the staff interface, you can only find holdings with the home or holding library. You can't search for the item type or anything else.

To recreate:

1. Go to a record details page in the staff interface (e.g. http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=285)

2. Add an item with a different itemtype
   2.1. Click New > New item
   2.2. Change the itemtype to Music (or another itemtype)
   2.3. Click Add item
   2.4. Click Normal to go back to the record details page

3. Try to search for the itemtype in the holdings
   3.1. Using the small search box right above the holdings table, search for the new itemtype (Music)
   --> No results

4. Optionally, search using other text in the holdings table
   - "Book" --> NOT OK does not find the items with the itemtype "Books"
   - "Midway" --> OK finds the items with the home or holding library "Midway"
   - "General" --> NOT OK does not find the items with the location "General stacks"
   - "Reference" --> NOT OK does not find the items with the collection "Reference"
   -  "2477" --> OK finds the item with the barcode 39999000012477

With git bisect, I was able to retrace that it was ok before bug 33568 and not after, but I don't know which commit exactly causes the problem since the holdings table doesn't load if I'm somewhere in the middle of all the 33568 commits.
Comment 1 Caroline Cyr La Rose 2025-01-31 20:45:44 UTC
I noticed that when searching for BK or MU, it finds the items with those itemtypes. 

I'm guessing it's a similar problem to bug 37334 (??) of the table using the codes instead of the labels.

However, home/holding libraries are searchable both by code and by name. I don't see why it couldn't be the same for item types.

- "CPL" --> OK finds items with Centerville home or holding library
- "Center" --> OK finds items with Centerville home or holding library
- "FPL" --> OK finds items with Fairview home or holding library
- "FAIR" --> OK finds items with Fairview home or holding library
Comment 2 Caroline Cyr La Rose 2025-01-31 20:59:34 UTC
There are no itemcallnumbers in KTD by default, but I found that those work fine, like the barcodes.