@@ -, +, @@ select count(*) from items where issues is null; --- C4/Items.pm | 3 +++ 1 file changed, 3 insertions(+) --- a/C4/Items.pm +++ a/C4/Items.pm @@ -2142,6 +2142,9 @@ sub _SearchItems_build_where_fragment { } $column = "ExtractValue($sqlfield, '$xpath')"; } + } elsif ($field eq 'issues') { + # Consider NULL as 0 for issues count + $column = 'COALESCE(issues,0)'; } else { $column = $field; } --