[Koha-bugs] [Bug 23081] Item search : Filter for Items with Zero Checkouts Returns No Results

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Oct 15 19:48:48 CEST 2019


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23081

Aguayo <azucena.aguayo at uvu.edu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |azucena.aguayo at uvu.edu

--- Comment #1 from Aguayo <azucena.aguayo at uvu.edu> ---
My library has been using the Item Search and also noticed the same problem
with the checkout count.

I think the problem is related to the "issues" field in the "items" table. The
"issues" field is of type SMALLINT with a default value of "null"


Using a report, I can illustrate the behavior.

Example 1:
select barcode, issues
from items
where issues <= <<equal or less than checkouts>>

Result 1:
Items with checkouts less or equal to the number you enter are listed but NOT
items with 0 checkouts. Same as the Item Search.


Example 2:
select barcode, issues
from items
where issues is null OR issues <= <<equal or less than checkouts>>

Result 2:
Items with checkouts less or equal to the number you enter are listed AND any
items with no checkouts. What we would expect to get if looking for check count
= 0 or < #


My assumption is that Koha displays a '0' when viewing an item on the staff
client, however the "items" table stores a "null" value in the "issues" field.
Limiting the checkout count with a '0' gives no results because there is no '0'
in the "issues" field.


If possible the "issues" field needs to have the default value set to '0', or
the Item Search code needs to account for a "null" value.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.


More information about the Koha-bugs mailing list