[Bug 38196] New: Filter out concerns by specific status does not include concern without status
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38196 Bug ID: 38196 Summary: Filter out concerns by specific status does not include concern without status Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Cataloging Assignee: koha-bugs@lists.koha-community.org Reporter: jonathan.druart@gmail.com QA Contact: testopia@bugs.koha-community.org CC: m.de.rooy@rijksmuseum.nl Depends on: 35628 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 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35628 [Bug 35628] Add optional statuses to catalog concerns -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38196 --- Comment #1 from Jonathan Druart <jonathan.druart@gmail.com> --- I could fix but only on top of bug 33484 (to prevent conflicts). -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38196 Jan Kissig <bibliothek@th-wildau.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bibliothek@th-wildau.de Assignee|koha-bugs@lists.koha-commun |bibliothek@th-wildau.de |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38196 Jan Kissig <bibliothek@th-wildau.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |42283 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42283 [Bug 42283] Tidy all script tags - cataloguing -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38196 Jan Kissig <bibliothek@th-wildau.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38196 --- Comment #2 from Jan Kissig <bibliothek@th-wildau.de> --- Created attachment 199411 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=199411&action=edit Bug 38196: Fix filter in catalog concerns to show tickets where status is NULL This patch fixes issues on catalog concerns when filtering for self defined authorized values (AV). When querying for status != AV, also rows with status = NULL are omitted as SQL here only checks for defined values in status. The patch wraps the a filter query with an 'or status is NULL'. Test plan: apply patch dependencies (42283) if not already included and run restart_all a) enable system preference CatalogConcerns b) create some authorised values in TICKET_STATUS c) create several concerns/tickets (biblio detail page -> new catalog concern) d) go to /cgi-bin/koha/cataloguing/concerns.pl and change some ticket status to have some variation for filtering e) play with the filters on the top (resolved and self created TICKET_STATUS) - when clicking 'Filter resolved' tickets with status 'Resolved by ... date' get filtered - when filtering self created TICKET_STATUS values tickets with that status AND tickets with status Open are disappearing f) apply patch and run restart_all g) retry steps in e) and check that only the filtered status are filtered from the results list. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38196 Bug 38196 depends on bug 42283, which changed state. Bug 42283 Summary: Tidy all script tags - cataloguing https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42283 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org