do_check_for_previous_checkout will pass a list of itemnumbers as part of the query. This could be hundreds of items or more. It makes sense to check by biblionumber instead when possible.
Created attachment 150782 [details] [review] Bug 33691: Improve query for do_check_for_previous_checkout do_check_for_previous_checkout will pass a list of itemnumbers as part of the query. This could be hundreds of items or more. It makes sense to check by biblionumber instead when possible. Test Plan: 1) prove t/db_dependent/Patron/Borrower_PrevCheckout.t 2) Apply this patch 3) prove t/db_dependent/Patron/Borrower_PrevCheckout.t 4) Test still pass!
Created attachment 150783 [details] [review] Bug 33691: Improve query for do_check_for_previous_checkout do_check_for_previous_checkout will pass a list of itemnumbers as part of the query. This could be hundreds of items or more. It makes sense to check by biblionumber instead when possible. Test Plan: 1) prove t/db_dependent/Patron/Borrower_PrevCheckout.t 2) Apply this patch 3) prove t/db_dependent/Patron/Borrower_PrevCheckout.t 4) Test still pass!
Created attachment 150784 [details] [review] Bug 33691: Improve query for do_check_for_previous_checkout do_check_for_previous_checkout will pass a list of itemnumbers as part of the query. This could be hundreds of items or more. It makes sense to check by biblionumber instead when possible. Test Plan: 1) prove t/db_dependent/Patron/Borrower_PrevCheckout.t 2) Apply this patch 3) prove t/db_dependent/Patron/Borrower_PrevCheckout.t 4) Test still pass!
Created attachment 150785 [details] [review] Bug 33691: Improve query for do_check_for_previous_checkout do_check_for_previous_checkout will pass a list of itemnumbers as part of the query. This could be hundreds of items or more. It makes sense to check by biblionumber instead when possible. Test Plan: 1) prove t/db_dependent/Patron/Borrower_PrevCheckout.t 2) Apply this patch 3) prove t/db_dependent/Patron/Borrower_PrevCheckout.t 4) Test still pass!
Created attachment 150818 [details] [review] Bug 33691: Improve query for do_check_for_previous_checkout do_check_for_previous_checkout will pass a list of itemnumbers as part of the query. This could be hundreds of items or more. It makes sense to check by biblionumber instead when possible. Test Plan: 1) prove t/db_dependent/Patron/Borrower_PrevCheckout.t 2) Apply this patch 3) prove t/db_dependent/Patron/Borrower_PrevCheckout.t 4) Test still pass! Signed-off-by: David Nind <david@davidnind.com>
my @item_nos; [..] @item_nos = $biblio->items->get_column( 'itemnumber' ); And now we are fetching lots of item numbers and doing nothing with them? Could you explain why we can miss the item numbers in general here ?