Description
Fridolin Somers
2020-01-17 09:24:38 UTC
Created attachment 97480 [details] [review] Bug 24443: Consider NULL as 0 for issues in items search In items search, we can filter by items issues count, data coming from items.issues. Most of the time, for an item with no issues this column contains NULL. This enhancement proposes to consider NULL as 0 to allow searching items with no issues. Test plan: 1) Use SQL to count items with items.issues = NULL : select count(*) from items where issues is null; 2) Go to items search 3) Perform search with filter "Checkout count" = 0 4) Check you get the same number of results as SQL query Created attachment 97481 [details] [review] Bug 24443: Unit test Created attachment 97482 [details] [review] Bug 24443: Consider NULL as 0 for issues in items search In items search, we can filter by items issues count, data coming from items.issues. Most of the time, for an item with no issues this column contains NULL. This enhancement proposes to consider NULL as 0 to allow searching items with no issues. Test plan: 1) Use SQL to count items with items.issues = NULL : select count(*) from items where issues is null; 2) Go to items search 3) Perform search with filter "Checkout count" = 0 4) Check you get the same number of results as SQL query Created attachment 97483 [details] [review] Bug 24443: Unit test Created attachment 97486 [details] [review] Bug 24443: Unit test Created attachment 97487 [details] [review] Bug 24443: Unit test Created attachment 97488 [details] [review] Bug 24443: Unit test Created attachment 97493 [details] [review] Bug 24443: Unit test Created attachment 97496 [details] [review] Bug 24443: Unit test Created attachment 97559 [details] [review] Bug 24443: Consider NULL as 0 for issues in items search In items search, we can filter by items issues count, data coming from items.issues. Most of the time, for an item with no issues this column contains NULL. This enhancement proposes to consider NULL as 0 to allow searching items with no issues. Test plan: 1) Use SQL to count items with items.issues = NULL : select count(*) from items where issues is null; 2) Go to items search 3) Perform search with filter "Checkout count" = 0 4) Check you get the same number of results as SQL query Signed-off-by: Maryse Simard <maryse.simard@inlibro.com> Created attachment 97560 [details] [review] Bug 24443: Unit test Signed-off-by: Maryse Simard <maryse.simard@inlibro.com> Created attachment 97801 [details] [review] Bug 24443: Consider NULL as 0 for issues in items search In items search, we can filter by items issues count, data coming from items.issues. Most of the time, for an item with no issues this column contains NULL. This enhancement proposes to consider NULL as 0 to allow searching items with no issues. Test plan: 1) Use SQL to count items with items.issues = NULL : select count(*) from items where issues is null; 2) Go to items search 3) Perform search with filter "Checkout count" = 0 4) Check you get the same number of results as SQL query Signed-off-by: Maryse Simard <maryse.simard@inlibro.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Created attachment 97802 [details] [review] Bug 24443: Unit test Signed-off-by: Maryse Simard <maryse.simard@inlibro.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Nice work everyone! Pushed to master for 20.05 Pushed to 19.11.x branch for 19.11.03 backported to 19.05.x for 19.05.08 Enhancement will not be backported to 18.11.x series. |