Bug 38196 - Filter out concerns by specific status does not include concern without status
Summary: Filter out concerns by specific status does not include concern without status
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low normal
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on: 35628
Blocks:
  Show dependency treegraph
 
Reported: 2024-10-17 14:31 UTC by Jonathan Druart
Modified: 2024-10-17 14:33 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 Jonathan Druart 2024-10-17 14:31:34 UTC
You can filter out concerns by status (ie. linked with TICKET_STATUS AV).

But if you use this "Filter" link on top of the page to remove the concerns with this specific status, it will also remove the concerns without a specific status.

concern 1 | Open
concern 2 | Resolved
concern 3 | status_1
concern 4 | status_2

"Filter status_1" should remove concern 3 only. However it will only show concern 4.

This is because the query is ([-and => {status => { '!=' => "status_1" }}])

And does not include status that are NULL in DB.

use Koha::Tickets;
my $t = Koha::Tickets->search;
say $_->status // "undefined" for $t->as_list;
say "===";
$t = Koha::Tickets->search([-and => {status => { '!=' => "status_1" }}]);
say $_->status for $t->as_list;

undefined
undefined
status_1
status_2
===
status_2
Comment 1 Jonathan Druart 2024-10-17 14:33:11 UTC
I could fix but only on top of bug 33484 (to prevent conflicts).