See also bug 37650. When we consider ConfirmFutureHolds to build the holds to pull list, we actually could say that these holds, probably only one or two days ahead, are current holds too. Currently, they are just completely ignored. But e.g. having a library depot further away require collecting those items earlier etc. At least the majority of calls look like they could use the lookahead days from ConfirmFutureHolds. Filed as enh, but very close to a bug.
Created attachment 171247 [details] [review] Bug 37651: Add ConfirmFutureHolds to item->current_holds Test plan: Add future item level hold for another branch. Check in. Confirm and transfer. Note that without this patch, there is no patron info for the column On hold for on transferstoreceive. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 171248 [details] [review] Bug 37651: Add ConfirmFutureHolds to biblio->current_holds Test plan: Easy way is to run the unit tests in the next patch. One call of biblio->current_holds is hidden in acqui/parcel.pl. The table column "Item holds / Total holds" should now make a difference for an order referring to an item having future holds. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 171249 [details] [review] Bug 37651: Unit tests Test plan: Run t/db_dependent/Holds.t (Without previous patches, it would fail.) Run t/db_dependent/Koha/Biblios.t
Created attachment 171250 [details] [review] Bug 37651: Unit tests Test plan: Run t/db_dependent/Holds.t (Without previous patches, it would fail.) Run t/db_dependent/Koha/Biblios.t Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 176654 [details] [review] Bug 37651: Add ConfirmFutureHolds to item->current_holds Test plan: Add future item level hold for another branch. Check in. Confirm and transfer. Note that without this patch, there is no patron info for the column On hold for on transferstoreceive. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 176655 [details] [review] Bug 37651: Add ConfirmFutureHolds to biblio->current_holds Test plan: Easy way is to run the unit tests in the next patch. One call of biblio->current_holds is hidden in acqui/parcel.pl. The table column "Item holds / Total holds" should now make a difference for an order referring to an item having future holds. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 176656 [details] [review] Bug 37651: Unit tests Test plan: Run t/db_dependent/Holds.t (Without previous patches, it would fail.) Run t/db_dependent/Koha/Biblios.t Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Rebased. Waiting since September..
Created attachment 176808 [details] [review] Bug 37651: Add ConfirmFutureHolds to item->current_holds Test plan: Add future item level hold for another branch. Check in. Confirm and transfer. Note that without this patch, there is no patron info for the column On hold for on transferstoreceive. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 176809 [details] [review] Bug 37651: Add ConfirmFutureHolds to biblio->current_holds Test plan: Easy way is to run the unit tests in the next patch. One call of biblio->current_holds is hidden in acqui/parcel.pl. The table column "Item holds / Total holds" should now make a difference for an order referring to an item having future holds. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 176810 [details] [review] Bug 37651: Unit tests Test plan: Run t/db_dependent/Holds.t (Without previous patches, it would fail.) Run t/db_dependent/Koha/Biblios.t Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 176811 [details] [review] Bug 37651: (QA follow-up) Add POD for Biblio method We were missing POD here. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This is a fun one.. current_holds is called in a fair number of places; thus, whilst this is a small and clear patch, it could have some wide-reaching effects. I'm signing off and will seek some QA opinions. My gut says it makes sense and is a step toward being able to deprecate C4::Reserves::CheckReserve.
(In reply to Martin Renvoize (ashimema) from comment #12) > Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Thx !
This feels wrong to me. The pref description: "Note that this number of days will be used too in calculating the default end date for the Holds to pull-report. But it does not interfere with issuing, renewing or transferring items." It seems that we need a filter_by method, and use it only where it needs this pref to be taken into account.
(In reply to Jonathan Druart from comment #15) > This feels wrong to me. > > The pref description: "Note that this number of days will be used too in > calculating the default end date for the Holds to pull-report. But it does > not interfere with issuing, renewing or transferring items." > > It seems that we need a filter_by method, and use it only where it needs > this pref to be taken into account. You are right. We should adjust the wording of that pref. Will add a follow-up. The filter_by comment is valid too. But I dont think that it should be done here. It is an improvement on its own. There are more methods that could be reworked into filter_by constructs. Like for instance: Koha/Biblio.pm current_checkouts Koha/Acquisition/Order.pm current_item_level_holds The point of this report is refine the existing two current_holds methods where the pref should be taken into account.
Created attachment 177372 [details] [review] Bug 37651: (QA follow-up) Rewording for pref ConfirmFutureHolds As requested by QA. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 178325 [details] [review] Bug 37651: Add ConfirmFutureHolds to item->current_holds Test plan: Add future item level hold for another branch. Check in. Confirm and transfer. Note that without this patch, there is no patron info for the column On hold for on transferstoreceive. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 178326 [details] [review] Bug 37651: Add ConfirmFutureHolds to biblio->current_holds Test plan: Easy way is to run the unit tests in the next patch. One call of biblio->current_holds is hidden in acqui/parcel.pl. The table column "Item holds / Total holds" should now make a difference for an order referring to an item having future holds. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 178327 [details] [review] Bug 37651: Unit tests Test plan: Run t/db_dependent/Holds.t (Without previous patches, it would fail.) Run t/db_dependent/Koha/Biblios.t Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 178328 [details] [review] Bug 37651: (QA follow-up) Add POD for Biblio method We were missing POD here. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 178329 [details] [review] Bug 37651: (QA follow-up) Rewording for pref ConfirmFutureHolds As requested by QA. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Rebased on tidied codebase