When checking out or placing hold, we should check if an existing reserve whose period overlap exists. A user place an hold from opac whose requested period overlap an existing reserve period => prevent reserve, A librarian place an hold from staff whose requested period overlap an existing reserve period => Warn librarian (Ask for confirmation), A librarian make a checkout from staff whose requested period overlap an existing reserve period => Warn librarian (Ask for confirmation).
Created attachment 45216 [details] [review] Bug 15261: Verify if checkouts/reserves requests periods overlap... ... with existing reserves When checking out or placing hold, we should check if an existing reserve whose period overlap exists. A user place an hold from opac whose requested period overlap an existing reserve period => prevent reserve, A librarian place an hold from staff whose requested period overlap an existing reserve period => Warn librarian (Ask for confirmation), A librarian make a checkout from staff whose requested period overlap an existing reserve period => Warn librarian (Ask for confirmation). Test plan: Enable syspref: AllowHoldDateInFuture OPACAllowHoldDateInFuture 1 (staff side): Place a hold on title (which has only one items) level with start date and expiration date. Place another hold (also title level) with period overlaping this reserve. Check you are warned about an existing reserve 2 (staff side): Place a hold on title (which has more than one items) level with start date and expiration date. Place another hold (also title level) with period overlaping this reserve. Check you are NOT warned about an existing reserve. Because it remains at least one item not reserved. 3 (staff side): Place a hold on item level with start date and expiration date. Place another hold on item level with period overlaping this reserve. Check you are warned about an existing reserve. 4 (opac side): Do the same than for staff side. Instead of a warn, reserve is prevented. 5: Place a hold on title (which has only one items) level with start date and expiration date. Try to checkout the unique item from this title with period overlaping the reserve period. Check you are warned about an existing reserve 6: Place a hold on title (which has more than one items) level with start date and expiration date. Checkout an item from this title with period overlaping the reserve period. Check you are NOT warned about an existing reserve. 7: Place a hold on item level with start date and expiration date. Checkout this item period overlaping the reserve period. Check you are warned about an existing reserve
The patch does not apply, given these errors after applying: Can't locate Date/Range.pm in @INC (@INC contains: /home/koha/src /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .) at /home/koha/src/Koha/DateUtils.pm line 21. BEGIN failed--compilation aborted at /home/koha/src/Koha/DateUtils.pm line 21. Compilation failed in require at /home/koha/src/C4/Search/History.pm line 7. BEGIN failed--compilation aborted at /home/koha/src/C4/Search/History.pm line 7. Compilation failed in require at /home/koha/src/C4/Auth.pm line 32. BEGIN failed--compilation aborted at /home/koha/src/C4/Auth.pm line 32. Compilation failed in require at /home/koha/src/mainpage.pl line 25. BEGIN failed--compilation aborted at /home/koha/src/mainpage.pl line 25.
Hello, There is 2 new dependencies: Date::Range and Date::Simple that you have to install.
Enable syspref: AllowHoldDateInFuture OPACAllowHoldDateInFuture Biblibre - test with http://pro.test1.biblibre.com: ok 1 (staff side): Place a hold on title (which has only one items) level with start date and expiration date. Place another hold (also title level) with period overlaping this reserve. Check you are warned about an existing reserve Biblibre - test with http://pro.test1.biblibre.com: ok 2 (staff side): Place a hold on title (which has more than one items) level with start date and expiration date. Place another hold (also title level) with period overlaping this reserve. Check you are NOT warned about an existing reserve. Because it remains at least one item not reserved. Biblibre - test with http://pro.test1.biblibre.com: ok 3 (staff side): Place a hold on item level with start date and expiration date. Place another hold on item level with period overlaping this reserve. Check you are warned about an existing reserve. Biblibre - test with http://pro.test1.biblibre.com: ok 4 (opac side): Do the same than for staff side. Instead of a warn, reserve is prevented. 5: Place a hold on title (which has only one items) level with start date and expiration date. Try to checkout the unique item from this title with period overlaping the reserve period. Check you are warned about an existing reserve Biblibre - test with http://catalogue.test1.biblibre.com: ok 6: Place a hold on title (which has more than one items) level with start date and expiration date. Checkout an item from this title with period overlaping the reserve period. Check you are NOT warned about an existing reserve. Biblibre - test with http://catalogue.test1.biblibre.com: ok: ok 7: Place a hold on item level with start date and expiration date. Checkout this item period overlaping the reserve period. Check you are warned about an existing reserve Biblibre - test with http://catalogue.test1.biblibre.com: ok: ok
Claire: Who did signoff this patch? Alex: Are you sure you cannot avoid to add the 2 deps and use DateTime to do the job?
Jonathan: I'm not sure of anything when talking about dates and programming. But Date::Range is the only tool i found that quickly checks if 2 date ranges overlap. Unfortunately, it works only with Date::Simple.
With DateTime and DateTime::Set, I am sure you can get the same result quickly.
Created attachment 45833 [details] [review] Bug 15261: remove Date::Range and Date::Simple dependencies
Created attachment 45841 [details] [review] Bug 15261: remove Date::Range and Date::Simple dependencies
Created attachment 46432 [details] [review] Bug 15261: Verify if checkouts/reserves requests periods overlap... ... with existing reserves When checking out or placing hold, we should check if an existing reserve whose period overlap exists. A user place an hold from opac whose requested period overlap an existing reserve period => prevent reserve, A librarian place an hold from staff whose requested period overlap an existing reserve period => Warn librarian (Ask for confirmation), A librarian make a checkout from staff whose requested period overlap an existing reserve period => Warn librarian (Ask for confirmation). Test plan: Enable syspref: AllowHoldDateInFuture OPACAllowHoldDateInFuture 1 (staff side): Place a hold on title (which has only one items) level with start date and expiration date. Place another hold (also title level) with period overlaping this reserve. Check you are warned about an existing reserve 2 (staff side): Place a hold on title (which has more than one items) level with start date and expiration date. Place another hold (also title level) with period overlaping this reserve. Check you are NOT warned about an existing reserve. Because it remains at least one item not reserved. 3 (staff side): Place a hold on item level with start date and expiration date. Place another hold on item level with period overlaping this reserve. Check you are warned about an existing reserve. 4 (opac side): Do the same than for staff side. Instead of a warn, reserve is prevented. 5: Place a hold on title (which has only one items) level with start date and expiration date. Try to checkout the unique item from this title with period overlaping the reserve period. Check you are warned about an existing reserve 6: Place a hold on title (which has more than one items) level with start date and expiration date. Checkout an item from this title with period overlaping the reserve period. Check you are NOT warned about an existing reserve. 7: Place a hold on item level with start date and expiration date. Checkout this item period overlaping the reserve period. Check you are warned about an existing reserve
Created attachment 46433 [details] [review] Bug 15261: remove Date::Range and Date::Simple dependencies
Patch tested with a sandbox, by delaye <stephane.delaye@biblibre.com>
Created attachment 46441 [details] [review] Bug 15261: Verify if checkouts/reserves requests periods overlap... ... with existing reserves When checking out or placing hold, we should check if an existing reserve whose period overlap exists. A user place an hold from opac whose requested period overlap an existing reserve period => prevent reserve, A librarian place an hold from staff whose requested period overlap an existing reserve period => Warn librarian (Ask for confirmation), A librarian make a checkout from staff whose requested period overlap an existing reserve period => Warn librarian (Ask for confirmation). Test plan: Enable syspref: AllowHoldDateInFuture OPACAllowHoldDateInFuture 1 (staff side): Place a hold on title (which has only one items) level with start date and expiration date. Place another hold (also title level) with period overlaping this reserve. Check you are warned about an existing reserve 2 (staff side): Place a hold on title (which has more than one items) level with start date and expiration date. Place another hold (also title level) with period overlaping this reserve. Check you are NOT warned about an existing reserve. Because it remains at least one item not reserved. 3 (staff side): Place a hold on item level with start date and expiration date. Place another hold on item level with period overlaping this reserve. Check you are warned about an existing reserve. 4 (opac side): Do the same than for staff side. Instead of a warn, reserve is prevented. 5: Place a hold on title (which has only one items) level with start date and expiration date. Try to checkout the unique item from this title with period overlaping the reserve period. Check you are warned about an existing reserve 6: Place a hold on title (which has more than one items) level with start date and expiration date. Checkout an item from this title with period overlaping the reserve period. Check you are NOT warned about an existing reserve. 7: Place a hold on item level with start date and expiration date. Checkout this item period overlaping the reserve period. Check you are warned about an existing reserve Signed-off-by: delaye <stephane.delaye@biblibre.com>
Created attachment 46442 [details] [review] Bug 15261: remove Date::Range and Date::Simple dependencies Signed-off-by: delaye <stephane.delaye@biblibre.com>
Hi Alex and Julian, some things about this patch: - Can you please add a some information about the use case of this? I am not sure about how this is used in the library. - It seems to change the behaviour, but there are no new preferences or configuration options introduced. Bit worried about this. As this touches the complicated matter of holds, I'd like to ask for another sign-off. Also to get another opinion about the mechanics of it. Adding Marcel and Kyle in CC.
Could you please clarify why an existing reserve and a new one should not be allowed to have some overlap in the period? In our case this may happen frequently.
(In reply to Marcel de Rooy from comment #16) > Could you please clarify why an existing reserve and a new one should not be > allowed to have some overlap in the period? > In our case this may happen frequently. It seems to me that this is more like treating a hold as a true reservation than a hold. It's saying "This item will go to this patron on this date, so nobody else can have it on that date". Kind of like reserving a conference room. Now, whether we should have that behavior or not is a the real question or not. This link is for another ILS and at seems to explain Holds vs Reserves vs Reservations pretty well: http://www.goalexandria.com/totw/tips/2009/100509.html
I should also note, we have Holds ( of course! ), we have Reserves ( aka Course Reserves ) but Koha doesn't really have Reservations as a first class feature.
Hi Kyle or Marcel, can you maybe explain the usual use case for the HoldDateInFuture setting? Maybe this will help to clear things up about the differences even more. I am not quite sure about myself and would like to understand better how it's currently used.
(In reply to Katrin Fischer from comment #19) > Hi Kyle or Marcel, > > can you maybe explain the usual use case for the HoldDateInFuture setting? > Maybe this will help to clear things up about the differences even more. I > am not quite sure about myself and would like to understand better how it's > currently used. I'm not the author of HoldDateInFuture ( iirc ), so I don't really know. I think that it is basically shoehorning Reservations behavior into holds, but since I don't have a use case, I may be wrong.
Ah, I thought it was yours - Holds... must be Kyle! Sorry!
(In reply to Katrin Fischer from comment #21) > Ah, I thought it was yours - Holds... must be Kyle! Sorry! lol, I can understand why ; )
(In reply to Katrin Fischer from comment #19) > can you maybe explain the usual use case for the HoldDateInFuture setting? > Maybe this will help to clear things up about the differences even more. I > am not quite sure about myself and would like to understand better how it's > currently used. We have enabled a.o.: AllowHoldDateInFuture, ConfirmFutureHolds=2, OPACAllowHoldDateInFuture. This offers the user to supply two additional dates with a hold request: Hold starts on date, and Hold not needed after. What does that mean? The patron tells us here that he would like to have the book only in the indicated (future) period. So we do not put the book in waiting status for him until this period is very close (ConfirmFutureHolds). In the meantime we can issue the book to someone else or let others place holds. Similarly, another patron can also say: I want this book between A and B. No problem if this overlaps the period of patron 1. Priority is here based on [future] start date. If the book could not be put in waiting status for patron 1 in the indicated period somehow, the expired hold will be cancelled. This is imo just a straightforward use of the two dates as Koha offers by default. Our specific local situation is not relevant in this discussion. Note that I am still missing any response from the authors of this patch.
Why Koha should allow to place hold that will be (probably) impossible to satisfy ? Let's take an example: - Patron 1 place a hold that starts on 2016-03-01 and ends on 2016-03-07 - Patron 2 place a hold that starts on 2016-03-02 and ends on 2016-03-06 If patron 1 get the book, patron 2 will never have it (unless patron 1 returns the book very quickly, which is very unlikely to happen imo) and is never informed about the high probability that this will happen. Another issue: - Patron 1 place a hold that starts on 2016-03-02 and ends on 2016-03-08 - Patron 2 place a hold (after patron 1 has placed their hold) that starts on 2016-03-01 (we don't care about the end date here) If priority is based on start date, then patron 2 will "steal" the book from patron 1. Patron 1 will never get the book while they have placed their hold first.
I think ideally we shoudl have a proper reservation system that maybe even works separately from the holds system. But my main concern here is that the new behavioru should be optional - so we honor the different workflows. If the books is not checked out or only used on-site, the library can coordinate overlapping holds.
(In reply to Julian Maurice from comment #24) Thx for your response. > Let's take an example: > - Patron 1 place a hold that starts on 2016-03-01 and ends on 2016-03-07 > - Patron 2 place a hold that starts on 2016-03-02 and ends on 2016-03-06 > If patron 1 get the book, patron 2 will never have it (unless patron 1 > returns the book very quickly, which is very unlikely to happen imo) and is > never informed about the high probability that this will happen. "Unlikely to happen imo " is the problem here. As a special library we loan the book and it will normally be returned the same day. (The book does not really leave the building.) > Another issue: > - Patron 1 place a hold that starts on 2016-03-02 and ends on 2016-03-08 > - Patron 2 place a hold (after patron 1 has placed their hold) that starts > on 2016-03-01 (we don't care about the end date here) > If priority is based on start date, then patron 2 will "steal" the book from > patron 1. Patron 1 will never get the book while they have placed their hold > first. No. Patron2 may receive the book before patron1. That is no problem. Patron1 will probably have it the next day.
(In reply to Marcel de Rooy from comment #26) > No. Patron2 may receive the book before patron1. That is no problem. Patron1 > will probably have it the next day. For a 1-day loan that is true. Looks like we are going to need another reserves syspref :(
Created attachment 49001 [details] [review] Bug 15261: Verify if checkouts/reserves requests periods overlap... ... with existing reserves When checking out or placing hold, we should check if an existing reserve whose period overlap exists. A user place an hold from opac whose requested period overlap an existing reserve period => prevent reserve, A librarian place an hold from staff whose requested period overlap an existing reserve period => Warn librarian (Ask for confirmation), A librarian make a checkout from staff whose requested period overlap an existing reserve period => Warn librarian (Ask for confirmation). Test plan: Enable syspref: AllowHoldDateInFuture OPACAllowHoldDateInFuture 1 (staff side): Place a hold on title (which has only one items) level with start date and expiration date. Place another hold (also title level) with period overlaping this reserve. Check you are warned about an existing reserve 2 (staff side): Place a hold on title (which has more than one items) level with start date and expiration date. Place another hold (also title level) with period overlaping this reserve. Check you are NOT warned about an existing reserve. Because it remains at least one item not reserved. 3 (staff side): Place a hold on item level with start date and expiration date. Place another hold on item level with period overlaping this reserve. Check you are warned about an existing reserve. 4 (opac side): Do the same than for staff side. Instead of a warn, reserve is prevented. 5: Place a hold on title (which has only one items) level with start date and expiration date. Try to checkout the unique item from this title with period overlaping the reserve period. Check you are warned about an existing reserve 6: Place a hold on title (which has more than one items) level with start date and expiration date. Checkout an item from this title with period overlaping the reserve period. Check you are NOT warned about an existing reserve. 7: Place a hold on item level with start date and expiration date. Checkout this item period overlaping the reserve period. Check you are warned about an existing reserve Rabased on master
Created attachment 49002 [details] [review] Bug 15261: remove Date::Range and Date::Simple dependencies Rebased on master
Created attachment 49003 [details] [review] Bug 15261: Add PreventChechoutOnSameReservePeriod and PreventReservesOnSamePeriod system preferences
Created attachment 52704 [details] [review] Bug 15261: Verify if checkouts/reserves requests periods overlap... ... with existing reserves When checking out or placing hold, we should check if an existing reserve whose period overlap exists. A user place an hold from opac whose requested period overlap an existing reserve period => prevent reserve, A librarian place an hold from staff whose requested period overlap an existing reserve period => Warn librarian (Ask for confirmation), A librarian make a checkout from staff whose requested period overlap an existing reserve period => Warn librarian (Ask for confirmation). Test plan: Enable syspref: AllowHoldDateInFuture OPACAllowHoldDateInFuture PreventChechoutOnSameReservePeriod and PreventReservesOnSamePeriod 1 (staff side): Place a hold on title (which has only one items) level with start date and expiration date. Place another hold (also title level) with period overlaping this reserve. Check you are warned about an existing reserve 2 (staff side): Place a hold on title (which has more than one items) level with start date and expiration date. Place another hold (also title level) with period overlaping this reserve. Check you are NOT warned about an existing reserve. Because it remains at least one item not reserved. 3 (staff side): Place a hold on item level with start date and expiration date. Place another hold on item level with period overlaping this reserve. Check you are warned about an existing reserve. 4 (opac side): Do the same than for staff side. Instead of a warn, reserve is prevented. 5: Place a hold on title (which has only one items) level with start date and expiration date. Try to checkout the unique item from this title with period overlaping the reserve period. Check you are warned about an existing reserve 6: Place a hold on title (which has more than one items) level with start date and expiration date. Checkout an item from this title with period overlaping the reserve period. Check you are NOT warned about an existing reserve. 7: Place a hold on item level with start date and expiration date. Checkout this item period overlaping the reserve period. Check you are warned about an existing reserve Rabased on master Rebased on master (2016-06-23)
Change in C4/Installer/PerlDependencies.pm is useless I think
(In reply to Fridolin SOMERS from comment #32) > Change in C4/Installer/PerlDependencies.pm is useless I think I think you are right Frido
Created attachment 59643 [details] [review] Bug 15261: Verify if checkouts/reserves requests periods overlap... ... with existing reserves When checking out or placing hold, we should check if an existing reserve whose period overlap exists. A user place an hold from opac whose requested period overlap an existing reserve period => prevent reserve, A librarian place an hold from staff whose requested period overlap an existing reserve period => Warn librarian (Ask for confirmation), A librarian make a checkout from staff whose requested period overlap an existing reserve period => Warn librarian (Ask for confirmation). Test plan: Enable syspref: AllowHoldDateInFuture OPACAllowHoldDateInFuture PreventChechoutOnSameReservePeriod and PreventReservesOnSamePeriod 1 (staff side): Place a hold on title (which has only one items) level with start date and expiration date. Place another hold (also title level) with period overlaping this reserve. Check you are warned about an existing reserve 2 (staff side): Place a hold on title (which has more than one items) level with start date and expiration date. Place another hold (also title level) with period overlaping this reserve. Check you are NOT warned about an existing reserve. Because it remains at least one item not reserved. 3 (staff side): Place a hold on item level with start date and expiration date. Place another hold on item level with period overlaping this reserve. Check you are warned about an existing reserve. 4 (opac side): Do the same than for staff side. Instead of a warn, reserve is prevented. 5: Place a hold on title (which has only one items) level with start date and expiration date. Try to checkout the unique item from this title with period overlaping the reserve period. Check you are warned about an existing reserve 6: Place a hold on title (which has more than one items) level with start date and expiration date. Checkout an item from this title with period overlaping the reserve period. Check you are NOT warned about an existing reserve. 7: Place a hold on item level with start date and expiration date. Checkout this item period overlaping the reserve period. Check you are warned about an existing reserve Rabased on master Rebased on master (2016-06-23)
Created attachment 61534 [details] [review] Bug 15261: Verify if checkouts/reserves requests periods overlap... ... with existing reserves When checking out or placing hold, we should check if an existing reserve whose period overlap exists. A user place an hold from opac whose requested period overlap an existing reserve period => prevent reserve, A librarian place an hold from staff whose requested period overlap an existing reserve period => Warn librarian (Ask for confirmation), A librarian make a checkout from staff whose requested period overlap an existing reserve period => Warn librarian (Ask for confirmation). Test plan: Enable syspref: AllowHoldDateInFuture OPACAllowHoldDateInFuture PreventChechoutOnSameReservePeriod and PreventReservesOnSamePeriod 1 (staff side): Place a hold on title (which has only one items) level with start date and expiration date. Place another hold (also title level) with period overlaping this reserve. Check you are warned about an existing reserve 2 (staff side): Place a hold on title (which has more than one items) level with start date and expiration date. Place another hold (also title level) with period overlaping this reserve. Check you are NOT warned about an existing reserve. Because it remains at least one item not reserved. 3 (staff side): Place a hold on item level with start date and expiration date. Place another hold on item level with period overlaping this reserve. Check you are warned about an existing reserve. 4 (opac side): Do the same than for staff side. Instead of a warn, reserve is prevented. 5: Place a hold on title (which has only one items) level with start date and expiration date. Try to checkout the unique item from this title with period overlaping the reserve period. Check you are warned about an existing reserve 6: Place a hold on title (which has more than one items) level with start date and expiration date. Checkout an item from this title with period overlaping the reserve period. Check you are NOT warned about an existing reserve. 7: Place a hold on item level with start date and expiration date. Checkout this item period overlaping the reserve period. Check you are warned about an existing reserve Rabased on master Rebased on master (2016-06-23) Rebased on master (2017-03-23)
Created attachment 61539 [details] [review] Bug 15261: Verify if checkouts/reserves requests periods overlap... ... with existing reserves When checking out or placing hold, we should check if an existing reserve whose period overlap exists. A user place an hold from opac whose requested period overlap an existing reserve period => prevent reserve, A librarian place an hold from staff whose requested period overlap an existing reserve period => Warn librarian (Ask for confirmation), A librarian make a checkout from staff whose requested period overlap an existing reserve period => Warn librarian (Ask for confirmation). Test plan: Enable syspref: AllowHoldDateInFuture OPACAllowHoldDateInFuture PreventChechoutOnSameReservePeriod and PreventReservesOnSamePeriod 1 (staff side): Place a hold on title (which has only one items) level with start date and expiration date. Place another hold (also title level) with period overlaping this reserve. Check you are warned about an existing reserve 2 (staff side): Place a hold on title (which has more than one items) level with start date and expiration date. Place another hold (also title level) with period overlaping this reserve. Check you are NOT warned about an existing reserve. Because it remains at least one item not reserved. 3 (staff side): Place a hold on item level with start date and expiration date. Place another hold on item level with period overlaping this reserve. Check you are warned about an existing reserve. 4 (opac side): Do the same than for staff side. Instead of a warn, reserve is prevented. 5: Place a hold on title (which has only one items) level with start date and expiration date. Try to checkout the unique item from this title with period overlaping the reserve period. Check you are warned about an existing reserve 6: Place a hold on title (which has more than one items) level with start date and expiration date. Checkout an item from this title with period overlaping the reserve period. Check you are NOT warned about an existing reserve. 7: Place a hold on item level with start date and expiration date. Checkout this item period overlaping the reserve period. Check you are warned about an existing reserve Rabased on master Rebased on master (2016-06-23) Rebased on master (2017-03-23)
Patch tested with a sandbox, by Séverine QUEUNE <severine.queune@bulac.fr>
Created attachment 61544 [details] [review] Bug 15261: Verify if checkouts/reserves requests periods overlap... ... with existing reserves When checking out or placing hold, we should check if an existing reserve whose period overlap exists. A user place an hold from opac whose requested period overlap an existing reserve period => prevent reserve, A librarian place an hold from staff whose requested period overlap an existing reserve period => Warn librarian (Ask for confirmation), A librarian make a checkout from staff whose requested period overlap an existing reserve period => Warn librarian (Ask for confirmation). Test plan: Enable syspref: AllowHoldDateInFuture OPACAllowHoldDateInFuture PreventChechoutOnSameReservePeriod and PreventReservesOnSamePeriod 1 (staff side): Place a hold on title (which has only one items) level with start date and expiration date. Place another hold (also title level) with period overlaping this reserve. Check you are warned about an existing reserve 2 (staff side): Place a hold on title (which has more than one items) level with start date and expiration date. Place another hold (also title level) with period overlaping this reserve. Check you are NOT warned about an existing reserve. Because it remains at least one item not reserved. 3 (staff side): Place a hold on item level with start date and expiration date. Place another hold on item level with period overlaping this reserve. Check you are warned about an existing reserve. 4 (opac side): Do the same than for staff side. Instead of a warn, reserve is prevented. 5: Place a hold on title (which has only one items) level with start date and expiration date. Try to checkout the unique item from this title with period overlaping the reserve period. Check you are warned about an existing reserve 6: Place a hold on title (which has more than one items) level with start date and expiration date. Checkout an item from this title with period overlaping the reserve period. Check you are NOT warned about an existing reserve. 7: Place a hold on item level with start date and expiration date. Checkout this item period overlaping the reserve period. Check you are warned about an existing reserve Rabased on master Rebased on master (2016-06-23) Rebased on master (2017-03-23) Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Typo: PreventChechoutOnSameReservePeriod
No longer applies and typo mentioned in previous comment
Created attachment 67088 [details] [review] Bug 15261: Verify if checkouts/reserves requests periods overlap... ... with existing reserves When checking out or placing hold, we should check if an existing reserve whose period overlap exists. A user place an hold from opac whose requested period overlap an existing reserve period => prevent reserve, A librarian place an hold from staff whose requested period overlap an existing reserve period => Warn librarian (Ask for confirmation), A librarian make a checkout from staff whose requested period overlap an existing reserve period => Warn librarian (Ask for confirmation). Test plan: Enable syspref: AllowHoldDateInFuture OPACAllowHoldDateInFuture PreventChechoutOnSameReservePeriod and PreventReservesOnSamePeriod 1 (staff side): Place a hold on title (which has only one items) level with start date and expiration date. Place another hold (also title level) with period overlaping this reserve. Check you are warned about an existing reserve 2 (staff side): Place a hold on title (which has more than one items) level with start date and expiration date. Place another hold (also title level) with period overlaping this reserve. Check you are NOT warned about an existing reserve. Because it remains at least one item not reserved. 3 (staff side): Place a hold on item level with start date and expiration date. Place another hold on item level with period overlaping this reserve. Check you are warned about an existing reserve. 4 (opac side): Do the same than for staff side. Instead of a warn, reserve is prevented. 5: Place a hold on title (which has only one items) level with start date and expiration date. Try to checkout the unique item from this title with period overlaping the reserve period. Check you are warned about an existing reserve 6: Place a hold on title (which has more than one items) level with start date and expiration date. Checkout an item from this title with period overlaping the reserve period. Check you are NOT warned about an existing reserve. 7: Place a hold on item level with start date and expiration date. Checkout this item period overlaping the reserve period. Check you are warned about an existing reserve Rabased on master Rebased on master (2016-06-23) Rebased on master (2017-03-23) Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Created attachment 67094 [details] [review] Bug 15261: Verify if checkouts/reserves requests periods overlap... ... with existing reserves When checking out or placing hold, we should check if an existing reserve whose period overlap exists. A user place an hold from opac whose requested period overlap an existing reserve period => prevent reserve, A librarian place an hold from staff whose requested period overlap an existing reserve period => Warn librarian (Ask for confirmation), A librarian make a checkout from staff whose requested period overlap an existing reserve period => Warn librarian (Ask for confirmation). Test plan: Enable syspref: AllowHoldDateInFuture OPACAllowHoldDateInFuture PreventChechoutOnSameReservePeriod and PreventReservesOnSamePeriod 1 (staff side): Place a hold on title (which has only one items) level with start date and expiration date. Place another hold (also title level) with period overlaping this reserve. Check you are warned about an existing reserve 2 (staff side): Place a hold on title (which has more than one items) level with start date and expiration date. Place another hold (also title level) with period overlaping this reserve. Check you are NOT warned about an existing reserve. Because it remains at least one item not reserved. 3 (staff side): Place a hold on item level with start date and expiration date. Place another hold on item level with period overlaping this reserve. Check you are warned about an existing reserve. 4 (opac side): Do the same than for staff side. Instead of a warn, reserve is prevented. 5: Place a hold on title (which has only one items) level with start date and expiration date. Try to checkout the unique item from this title with period overlaping the reserve period. Check you are warned about an existing reserve 6: Place a hold on title (which has more than one items) level with start date and expiration date. Checkout an item from this title with period overlaping the reserve period. Check you are NOT warned about an existing reserve. 7: Place a hold on item level with start date and expiration date. Checkout this item period overlaping the reserve period. Check you are warned about an existing reserve Rabased on master Rebased on master (2016-06-23) Rebased on master (2017-03-23) Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Created attachment 67143 [details] [review] Bug 15261 - Check reserves while renewing an issue Test plan: - Create an issue (i.e from 15/09/2017 to 04/10/2017), - place a reserve on the same item from 05/10/2017 to 30/10/2017), - enable PreventCheckoutOnSameReservePeriod, - Check that you are not able to renew the issue.
When applying these patches this error is thrown: Apply? [(y)es, (n)o, (i)nteractive] y Applying: Bug 15261: Verify if checkouts/reserves requests periods overlap... Applying: Bug 15261 - Check reserves while renewing an issue fatal: sha1 information is lacking or useless (C4/Circulation.pm). Repository lacks necessary blobs to fall back on 3-way merge. Cannot fall back to three-way merge. Patch failed at 0001 Bug 15261 - Check reserves while renewing an issue The copy of the patch that failed is found in: /home/vagrant/kohaclone/.git/rebase-apply/patch When you have resolved this problem run "git bz apply --continue". If you would prefer to skip this patch, instead run "git bz apply --skip". To restore the original branch and stop patching run "git bz apply --abort". Patch left in /tmp/Bug-15261---Check-reserves-while-renewing-an-issue-b3aCiG.patch
Created attachment 68660 [details] [review] Bug 17829: (follow-up) Move GetMember to Koha::Patron Do not call method on $patron if there is no other reserves Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 68661 [details] [review] Bug 17829: (follow-up) Move GetMember to Koha::Patron Do not call method on $patron if there is no other reserves Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 68662 [details] [review] Bug 17829: (follow-up) Move GetMember to Koha::Patron Do not call method on $patron if there is no other reserves Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 68663 [details] [review] Bug 15261: Verify if checkouts/reserves requests periods overlap... ... with existing reserves When checking out or placing hold, we should check if an existing reserve whose period overlap exists. A user place an hold from opac whose requested period overlap an existing reserve period => prevent reserve, A librarian place an hold from staff whose requested period overlap an existing reserve period => Warn librarian (Ask for confirmation), A librarian make a checkout from staff whose requested period overlap an existing reserve period => Warn librarian (Ask for confirmation). Test plan: Enable syspref: AllowHoldDateInFuture OPACAllowHoldDateInFuture PreventChechoutOnSameReservePeriod and PreventReservesOnSamePeriod 1 (staff side): Place a hold on title (which has only one items) level with start date and expiration date. Place another hold (also title level) with period overlaping this reserve. Check you are warned about an existing reserve 2 (staff side): Place a hold on title (which has more than one items) level with start date and expiration date. Place another hold (also title level) with period overlaping this reserve. Check you are NOT warned about an existing reserve. Because it remains at least one item not reserved. 3 (staff side): Place a hold on item level with start date and expiration date. Place another hold on item level with period overlaping this reserve. Check you are warned about an existing reserve. 4 (opac side): Do the same than for staff side. Instead of a warn, reserve is prevented. 5: Place a hold on title (which has only one items) level with start date and expiration date. Try to checkout the unique item from this title with period overlaping the reserve period. Check you are warned about an existing reserve 6: Place a hold on title (which has more than one items) level with start date and expiration date. Checkout an item from this title with period overlaping the reserve period. Check you are NOT warned about an existing reserve. 7: Place a hold on item level with start date and expiration date. Checkout this item period overlaping the reserve period. Check you are warned about an existing reserve Rabased on master Rebased on master (2016-06-23) Rebased on master (2017-03-23) Rebased on master (2017-10-27) Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Created attachment 68664 [details] [review] Bug 15261 - Check reserves while renewing an issue Test plan: - Create an issue (i.e from 15/09/2017 to 04/10/2017), - place a reserve on the same item from 05/10/2017 to 30/10/2017), - enable PreventCheckoutOnSameReservePeriod, - Check that you are not able to renew the issue. rebased master (2017-10-27)
Created attachment 68852 [details] [review] Bug 15261: Verify if checkouts/reserves requests periods overlap... ... with existing reserves When checking out or placing hold, we should check if an existing reserve whose period overlap exists. A user place an hold from opac whose requested period overlap an existing reserve period => prevent reserve, A librarian place an hold from staff whose requested period overlap an existing reserve period => Warn librarian (Ask for confirmation), A librarian make a checkout from staff whose requested period overlap an existing reserve period => Warn librarian (Ask for confirmation). Test plan: Enable syspref: AllowHoldDateInFuture OPACAllowHoldDateInFuture PreventChechoutOnSameReservePeriod and PreventReservesOnSamePeriod 1 (staff side): Place a hold on title (which has only one items) level with start date and expiration date. Place another hold (also title level) with period overlaping this reserve. Check you are warned about an existing reserve 2 (staff side): Place a hold on title (which has more than one items) level with start date and expiration date. Place another hold (also title level) with period overlaping this reserve. Check you are NOT warned about an existing reserve. Because it remains at least one item not reserved. 3 (staff side): Place a hold on item level with start date and expiration date. Place another hold on item level with period overlaping this reserve. Check you are warned about an existing reserve. 4 (opac side): Do the same than for staff side. Instead of a warn, reserve is prevented. 5: Place a hold on title (which has only one items) level with start date and expiration date. Try to checkout the unique item from this title with period overlaping the reserve period. Check you are warned about an existing reserve 6: Place a hold on title (which has more than one items) level with start date and expiration date. Checkout an item from this title with period overlaping the reserve period. Check you are NOT warned about an existing reserve. 7: Place a hold on item level with start date and expiration date. Checkout this item period overlaping the reserve period. Check you are warned about an existing reserve Rabased on master Rebased on master (2016-06-23) Rebased on master (2017-03-23) Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Created attachment 68853 [details] [review] Bug 15261 - Check reserves while renewing an issue Test plan: - Create an issue (i.e from 15/09/2017 to 04/10/2017), - place a reserve on the same item from 05/10/2017 to 30/10/2017), - enable PreventCheckoutOnSameReservePeriod, - Check that you are not able to renew the issue.
The sandbox you've requested is not ready. Some problems occurred applying patches from bug 15261: <h1>Something went wrong !</h1>Applying: Bug 15261: Verify if checkouts/reserves requests periods overlap... Using index info to reconstruct a base tree... M C4/Circulation.pm M C4/Reserves.pm M Koha/DateUtils.pm M circ/circulation.pl M installer/data/mysql/sysprefs.sql M koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref M koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt M opac/opac-reserve.pl M reserve/placerequest.pl Falling back to patching base and 3-way merge... Auto-merging reserve/placerequest.pl Auto-merging opac/opac-reserve.pl Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref Auto-merging installer/data/mysql/sysprefs.sql Auto-merging circ/circulation.pl Auto-merging Koha/DateUtils.pm Auto-merging C4/Reserves.pm Auto-merging C4/Circulation.pm error: Failed to merge in the changes. Patch failed at 0001 Bug 15261: Verify if checkouts/reserves requests periods overlap... The copy of the patch that failed is found in: .git/rebase-apply/patch When you have resolved this problem run git bz apply --continue. If you would prefer to skip this patch, instead run git bz apply --skip. To restore the original branch and stop patching run git bz apply --abort. Bug 15261 - Verify if checkouts or reserves requests periods overlap with existing reserves 68852 - Bug 15261: Verify if checkouts/reserves requests periods overlap... 68853 - Bug 15261 - Check reserves while renewing an issue Apply? [(y)es, (n)o, (i)nteractive] Patch left in /tmp/Bug-15261-Verify-if-checkoutsreserves-requests-per-9hD_17.patch .
Created attachment 72956 [details] [review] Bug 15261: Verify if checkouts/reserves requests periods overlap... ... with existing reserves When checking out or placing hold, we should check if an existing reserve whose period overlap exists. A user place an hold from opac whose requested period overlap an existing reserve period => prevent reserve, A librarian place an hold from staff whose requested period overlap an existing reserve period => Warn librarian (Ask for confirmation), A librarian make a checkout from staff whose requested period overlap an existing reserve period => Warn librarian (Ask for confirmation). Test plan: Enable syspref: AllowHoldDateInFuture OPACAllowHoldDateInFuture PreventChechoutOnSameReservePeriod and PreventReservesOnSamePeriod 1 (staff side): Place a hold on title (which has only one items) level with start date and expiration date. Place another hold (also title level) with period overlaping this reserve. Check you are warned about an existing reserve 2 (staff side): Place a hold on title (which has more than one items) level with start date and expiration date. Place another hold (also title level) with period overlaping this reserve. Check you are NOT warned about an existing reserve. Because it remains at least one item not reserved. 3 (staff side): Place a hold on item level with start date and expiration date. Place another hold on item level with period overlaping this reserve. Check you are warned about an existing reserve. 4 (opac side): Do the same than for staff side. Instead of a warn, reserve is prevented. 5: Place a hold on title (which has only one items) level with start date and expiration date. Try to checkout the unique item from this title with period overlaping the reserve period. Check you are warned about an existing reserve 6: Place a hold on title (which has more than one items) level with start date and expiration date. Checkout an item from this title with period overlaping the reserve period. Check you are NOT warned about an existing reserve. 7: Place a hold on item level with start date and expiration date. Checkout this item period overlaping the reserve period. Check you are warned about an existing reserve Rabased on master Rebased on master (2016-06-23) Rebased on master (2017-03-23) Rebased on master (2018-03-15) Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Created attachment 72957 [details] [review] Bug 15261 - Check reserves while renewing an issue Test plan: - Create an issue (i.e from 15/09/2017 to 04/10/2017), - place a reserve on the same item from 05/10/2017 to 30/10/2017), - enable PreventCheckoutOnSameReservePeriod, - Check that you are not able to renew the issue. Rebased (2018-03-15)
Oups, looks like patch makes a lot of unwanted changes in koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref
Oups there is an obsolete : use C4::Branch in t/db_dependent/Circulation/CanBookBeIssued.t
(In reply to Fridolin SOMERS from comment #55) > Oups, looks like patch makes a lot of unwanted changes in > koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref Oh I found it : Tabs instead of 4 spaces in many places. This brakes the file which is a YAML.
Created attachment 76221 [details] [review] Bug 15261: Verify if checkouts/reserves requests periods overlap... ... with existing reserves When checking out or placing hold, we should check if an existing reserve whose period overlap exists. A user place an hold from opac whose requested period overlap an existing reserve period => prevent reserve, A librarian place an hold from staff whose requested period overlap an existing reserve period => Warn librarian (Ask for confirmation), A librarian make a checkout from staff whose requested period overlap an existing reserve period => Warn librarian (Ask for confirmation). Test plan: Enable syspref: AllowHoldDateInFuture OPACAllowHoldDateInFuture PreventChechoutOnSameReservePeriod and PreventReservesOnSamePeriod 1 (staff side): Place a hold on title (which has only one items) level with start date and expiration date. Place another hold (also title level) with period overlaping this reserve. Check you are warned about an existing reserve 2 (staff side): Place a hold on title (which has more than one items) level with start date and expiration date. Place another hold (also title level) with period overlaping this reserve. Check you are NOT warned about an existing reserve. Because it remains at least one item not reserved. 3 (staff side): Place a hold on item level with start date and expiration date. Place another hold on item level with period overlaping this reserve. Check you are warned about an existing reserve. 4 (opac side): Do the same than for staff side. Instead of a warn, reserve is prevented. 5: Place a hold on title (which has only one items) level with start date and expiration date. Try to checkout the unique item from this title with period overlaping the reserve period. Check you are warned about an existing reserve 6: Place a hold on title (which has more than one items) level with start date and expiration date. Checkout an item from this title with period overlaping the reserve period. Check you are NOT warned about an existing reserve. 7: Place a hold on item level with start date and expiration date. Checkout this item period overlaping the reserve period. Check you are warned about an existing reserve Rabased on master Rebased on master (2016-06-23) Rebased on master (2017-03-23) Rebased on master (2018-03-15) Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com>
Created attachment 76222 [details] [review] Bug 15261 - Check reserves while renewing an issue Test plan: - Create an issue (i.e from 15/09/2017 to 04/10/2017), - place a reserve on the same item from 05/10/2017 to 30/10/2017), - enable PreventCheckoutOnSameReservePeriod, - Check that you are not able to renew the issue. Rebased (2018-03-15) Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com>
(In reply to Fridolin SOMERS from comment #57) > (In reply to Fridolin SOMERS from comment #55) > > Oups, looks like patch makes a lot of unwanted changes in > > koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref > > Oh I found it : > Tabs instead of 4 spaces in many places. > This brakes the file which is a YAML. I have rebased the patches and removed unwanted changes on circulation.pref
(In reply to Alex Arnaud from comment #60) > (In reply to Fridolin SOMERS from comment #57) > > (In reply to Fridolin SOMERS from comment #55) > > > Oups, looks like patch makes a lot of unwanted changes in > > > koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref > > > > Oh I found it : > > Tabs instead of 4 spaces in many places. > > This brakes the file which is a YAML. > > I have rebased the patches and removed unwanted changes on circulation.pref Thanks a lot Alex ;)
A small issue : $borrowernumber is declared twice in reserve/placerequest.pl : my ( $template, $borrowernumber, $cookie, $flags ) = get_template_and_user( my $borrowernumber=$input->param('borrowernumber'); I think we should rename the second var.
I had dependency on Bug 20724 because it moved code from reserve/placerequest.pl
Conflict when installing on sandbox Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref
Created attachment 88292 [details] [review] Bug 15261: Verify if checkouts/reserves requests periods overlap... ... with existing reserves When checking out or placing hold, we should check if an existing reserve whose period overlap exists. A user place an hold from opac whose requested period overlap an existing reserve period => prevent reserve, A librarian place an hold from staff whose requested period overlap an existing reserve period => Warn librarian (Ask for confirmation), A librarian make a checkout from staff whose requested period overlap an existing reserve period => Warn librarian (Ask for confirmation). Test plan: Enable syspref: AllowHoldDateInFuture OPACAllowHoldDateInFuture PreventChechoutOnSameReservePeriod and PreventReservesOnSamePeriod 1 (staff side): Place a hold on title (which has only one items) level with start date and expiration date. Place another hold (also title level) with period overlaping this reserve. Check you are warned about an existing reserve 2 (staff side): Place a hold on title (which has more than one items) level with start date and expiration date. Place another hold (also title level) with period overlaping this reserve. Check you are NOT warned about an existing reserve. Because it remains at least one item not reserved. 3 (staff side): Place a hold on item level with start date and expiration date. Place another hold on item level with period overlaping this reserve. Check you are warned about an existing reserve. 4 (opac side): Do the same than for staff side. Instead of a warn, reserve is prevented. 5: Place a hold on title (which has only one items) level with start date and expiration date. Try to checkout the unique item from this title with period overlaping the reserve period. Check you are warned about an existing reserve 6: Place a hold on title (which has more than one items) level with start date and expiration date. Checkout an item from this title with period overlaping the reserve period. Check you are NOT warned about an existing reserve. 7: Place a hold on item level with start date and expiration date. Checkout this item period overlaping the reserve period. Check you are warned about an existing reserve Rebased on master (2016-03-11) Rebased on master (2016-06-23) Rebased on master (2017-03-23) Rebased on master (2018-03-15) Rebased on master (2019-04-18) Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com>
Created attachment 88293 [details] [review] Bug 15261: Check reserves while renewing an issue Test plan: - Create an issue (i.e from 15/09/2017 to 04/10/2017), - place a reserve on the same item from 05/10/2017 to 30/10/2017), - enable PreventCheckoutOnSameReservePeriod, - Check that you are not able to renew the issue. Rebased (2018-03-15) Rebased (2019-04-18) Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com>
Created attachment 88297 [details] [review] Bug 15261: Verify if checkouts/reserves requests periods overlap... ... with existing reserves When checking out or placing hold, we should check if an existing reserve whose period overlap exists. A user place an hold from opac whose requested period overlap an existing reserve period => prevent reserve, A librarian place an hold from staff whose requested period overlap an existing reserve period => Warn librarian (Ask for confirmation), A librarian make a checkout from staff whose requested period overlap an existing reserve period => Warn librarian (Ask for confirmation). Test plan: Enable syspref: AllowHoldDateInFuture OPACAllowHoldDateInFuture PreventChechoutOnSameReservePeriod and PreventReservesOnSamePeriod 1 (staff side): Place a hold on title (which has only one items) level with start date and expiration date. Place another hold (also title level) with period overlaping this reserve. Check you are warned about an existing reserve 2 (staff side): Place a hold on title (which has more than one items) level with start date and expiration date. Place another hold (also title level) with period overlaping this reserve. Check you are NOT warned about an existing reserve. Because it remains at least one item not reserved. 3 (staff side): Place a hold on item level with start date and expiration date. Place another hold on item level with period overlaping this reserve. Check you are warned about an existing reserve. 4 (opac side): Do the same than for staff side. Instead of a warn, reserve is prevented. 5: Place a hold on title (which has only one items) level with start date and expiration date. Try to checkout the unique item from this title with period overlaping the reserve period. Check you are warned about an existing reserve 6: Place a hold on title (which has more than one items) level with start date and expiration date. Checkout an item from this title with period overlaping the reserve period. Check you are NOT warned about an existing reserve. 7: Place a hold on item level with start date and expiration date. Checkout this item period overlaping the reserve period. Check you are warned about an existing reserve Rebased on master (2016-03-11) Rebased on master (2016-06-23) Rebased on master (2017-03-23) Rebased on master (2018-03-15) Rebased on master (2019-04-18) Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com>
Created attachment 88298 [details] [review] Bug 15261: Check reserves while renewing an issue Test plan: - Create an issue (i.e from 15/09/2017 to 04/10/2017), - place a reserve on the same item from 05/10/2017 to 30/10/2017), - enable PreventCheckoutOnSameReservePeriod, - Check that you are not able to renew the issue. Rebased (2018-03-15) Rebased (2019-04-18) Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com>
Conflicts when applying on sandbox : CONFLICT (content): Merge conflict in reserve/placerequest.pl Auto-merging opac/opac-reserve.pl Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref
Created attachment 92376 [details] [review] Bug 15261: Verify if checkouts/reserves requests periods overlap... ... with existing reserves When checking out or placing hold, we should check if an existing reserve whose period overlap exists. A user place an hold from opac whose requested period overlap an existing reserve period => prevent reserve, A librarian place an hold from staff whose requested period overlap an existing reserve period => Warn librarian (Ask for confirmation), A librarian make a checkout from staff whose requested period overlap an existing reserve period => Warn librarian (Ask for confirmation). Test plan: Enable syspref: AllowHoldDateInFuture OPACAllowHoldDateInFuture PreventChechoutOnSameReservePeriod and PreventReservesOnSamePeriod 1 (staff side): Place a hold on title (which has only one items) level with start date and expiration date. Place another hold (also title level) with period overlaping this reserve. Check you are warned about an existing reserve 2 (staff side): Place a hold on title (which has more than one items) level with start date and expiration date. Place another hold (also title level) with period overlaping this reserve. Check you are NOT warned about an existing reserve. Because it remains at least one item not reserved. 3 (staff side): Place a hold on item level with start date and expiration date. Place another hold on item level with period overlaping this reserve. Check you are warned about an existing reserve. 4 (opac side): Do the same than for staff side. Instead of a warn, reserve is prevented. 5: Place a hold on title (which has only one items) level with start date and expiration date. Try to checkout the unique item from this title with period overlaping the reserve period. Check you are warned about an existing reserve 6: Place a hold on title (which has more than one items) level with start date and expiration date. Checkout an item from this title with period overlaping the reserve period. Check you are NOT warned about an existing reserve. 7: Place a hold on item level with start date and expiration date. Checkout this item period overlaping the reserve period. Check you are warned about an existing reserve Rebased on master (2016-03-11) Rebased on master (2016-06-23) Rebased on master (2017-03-23) Rebased on master (2018-03-15) Rebased on master (2019-04-18) Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com>
Created attachment 92377 [details] [review] Bug 15261: Check reserves while renewing an issue Test plan: - Create an issue (i.e from 15/09/2017 to 04/10/2017), - place a reserve on the same item from 05/10/2017 to 30/10/2017), - enable PreventCheckoutOnSameReservePeriod, - Check that you are not able to renew the issue. Rebased (2018-03-15) Rebased (2019-04-18) Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com>
Created attachment 92584 [details] [review] Bug 15261: Verify if checkouts/reserves requests periods overlap... ... with existing reserves When checking out or placing hold, we should check if an existing reserve whose period overlap exists. A user place an hold from opac whose requested period overlap an existing reserve period => prevent reserve, A librarian place an hold from staff whose requested period overlap an existing reserve period => Warn librarian (Ask for confirmation), A librarian make a checkout from staff whose requested period overlap an existing reserve period => Warn librarian (Ask for confirmation). Test plan: Enable syspref: AllowHoldDateInFuture OPACAllowHoldDateInFuture PreventChechoutOnSameReservePeriod and PreventReservesOnSamePeriod 1 (staff side): Place a hold on title (which has only one items) level with start date and expiration date. Place another hold (also title level) with period overlaping this reserve. Check you are warned about an existing reserve 2 (staff side): Place a hold on title (which has more than one items) level with start date and expiration date. Place another hold (also title level) with period overlaping this reserve. Check you are NOT warned about an existing reserve. Because it remains at least one item not reserved. 3 (staff side): Place a hold on item level with start date and expiration date. Place another hold on item level with period overlaping this reserve. Check you are warned about an existing reserve. 4 (opac side): Do the same than for staff side. Instead of a warn, reserve is prevented. 5: Place a hold on title (which has only one items) level with start date and expiration date. Try to checkout the unique item from this title with period overlaping the reserve period. Check you are warned about an existing reserve 6: Place a hold on title (which has more than one items) level with start date and expiration date. Checkout an item from this title with period overlaping the reserve period. Check you are NOT warned about an existing reserve. 7: Place a hold on item level with start date and expiration date. Checkout this item period overlaping the reserve period. Check you are warned about an existing reserve Rebased on master (2016-03-11) Rebased on master (2016-06-23) Rebased on master (2017-03-23) Rebased on master (2018-03-15) Rebased on master (2019-04-18) Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com>
Created attachment 92585 [details] [review] Bug 15261: Check reserves while renewing an issue Test plan: - Create an issue (i.e from 15/09/2017 to 04/10/2017), - place a reserve on the same item from 05/10/2017 to 30/10/2017), - enable PreventCheckoutOnSameReservePeriod, - Check that you are not able to renew the issue. Rebased (2018-03-15) Rebased (2019-04-18) Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com>
1) Place a hold on title (which has only one items) level with start date and expiration date : impossible to validate the hold : Global symbol "@realbi" requires explicit package name (did you forget to declare "my @realbi"?) at /home/koha/src/reserve/placerequest.pl line 107. Execution of /home/koha/src/reserve/placerequest.pl aborted due to compilation errors.
Created attachment 92664 [details] [review] Bug 15261: Fix compilation error in reserve/placerequest.pl
Created attachment 93136 [details] [review] Bug 15261: Check if checkout/reserve request overlaps existing reserves When checking out or placing hold, we should check if an existing reserve whose period overlap exists. - A user places a hold from opac whose requested period overlaps with an existing reserve period => prevent reserve - A librarian places a hold from staff whose requested period overlaps with an existing reserve period => Warn librarian (Ask for confirmation) - A librarian makes a checkout from staff whose requested period overlaps with an existing reserve period => Warn librarian (Ask for confirmation) Test plan: Enable syspref: AllowHoldDateInFuture OPACAllowHoldDateInFuture PreventChechoutOnSameReservePeriod and PreventReservesOnSamePeriod 1 (staff side): - Place a hold on title (which has only one items) level with start date and expiration date. - Place another hold (also title level) with period overlaping this reserve. - Check you are warned about an existing reserve 2 (staff side): - Place a hold on title (which has more than one items) level with start date and expiration date. - Place another hold (also title level) with period overlaping this reserve. - Check you are NOT warned about an existing reserve. Because it remains at least one item not reserved. 3 (staff side): - Place a hold on item level with start date and expiration date. - Place another hold on item level with period overlaping this reserve. - Check you are warned about an existing reserve. 4 (opac side): - Do the same than for staff side. Instead of a warn, reserve is prevented. 5: - Place a hold on title (which has only one items) level with start date and expiration date. - Try to checkout the unique item from this title with period overlaping the reserve period. - Check you are warned about an existing reserve 6: - Place a hold on title (which has more than one items) level with start date and expiration date. - Checkout an item from this title with period overlaping the reserve period. - Check you are NOT warned about an existing reserve. 7: - Place a hold on item level with start date and expiration date. - Checkout this item period overlaping the reserve period. - Check you are warned about an existing reserve 8: - Create a checkout (i.e from ${TODAY} to ${TODAY + 10 days}), - Place a hold on the same item from ${TODAY + 11 days} to ${TODAY + 30 days}), - Check that you cannot renew the checkout.
Created attachment 94871 [details] [review] Bug 15261: Check if checkout/reserve request overlaps existing reserves When checking out or placing hold, we should check if an existing reserve whose period overlap exists. - A user places a hold from opac whose requested period overlaps with an existing reserve period => prevent reserve - A librarian places a hold from staff whose requested period overlaps with an existing reserve period => Warn librarian (Ask for confirmation) - A librarian makes a checkout from staff whose requested period overlaps with an existing reserve period => Warn librarian (Ask for confirmation) Test plan: Enable syspref: AllowHoldDateInFuture OPACAllowHoldDateInFuture PreventChechoutOnSameReservePeriod and PreventReservesOnSamePeriod 1 (staff side): - Place a hold on title (which has only one items) level with start date and expiration date. - Place another hold (also title level) with period overlaping this reserve. - Check you are warned about an existing reserve 2 (staff side): - Place a hold on title (which has more than one items) level with start date and expiration date. - Place another hold (also title level) with period overlaping this reserve. - Check you are NOT warned about an existing reserve. Because it remains at least one item not reserved. 3 (staff side): - Place a hold on item level with start date and expiration date. - Place another hold on item level with period overlaping this reserve. - Check you are warned about an existing reserve. 4 (opac side): - Do the same than for staff side. Instead of a warn, reserve is prevented. 5: - Place a hold on title (which has only one items) level with start date and expiration date. - Try to checkout the unique item from this title with period overlaping the reserve period. - Check you are warned about an existing reserve 6: - Place a hold on title (which has more than one items) level with start date and expiration date. - Checkout an item from this title with period overlaping the reserve period. - Check you are NOT warned about an existing reserve. 7: - Place a hold on item level with start date and expiration date. - Checkout this item period overlaping the reserve period. - Check you are warned about an existing reserve 8: - Create a checkout (i.e from ${TODAY} to ${TODAY + 10 days}), - Place a hold on the same item from ${TODAY + 11 days} to ${TODAY + 30 days}), - Check that you cannot renew the checkout.
Applied on sandbox CONFLICT (content): Merge conflict in t/db_dependent/Circulation.t
Created attachment 98383 [details] [review] Bug 15261: Check if checkout/reserve request overlaps existing reserves When checking out or placing hold, we should check if an existing reserve whose period overlap exists. - A user places a hold from opac whose requested period overlaps with an existing reserve period => prevent reserve - A librarian places a hold from staff whose requested period overlaps with an existing reserve period => Warn librarian (Ask for confirmation) - A librarian makes a checkout from staff whose requested period overlaps with an existing reserve period => Warn librarian (Ask for confirmation) Test plan: Enable syspref: AllowHoldDateInFuture OPACAllowHoldDateInFuture PreventChechoutOnSameReservePeriod and PreventReservesOnSamePeriod 1 (staff side): - Place a hold on title (which has only one items) level with start date and expiration date. - Place another hold (also title level) with period overlaping this reserve. - Check you are warned about an existing reserve 2 (staff side): - Place a hold on title (which has more than one items) level with start date and expiration date. - Place another hold (also title level) with period overlaping this reserve. - Check you are NOT warned about an existing reserve. Because it remains at least one item not reserved. 3 (staff side): - Place a hold on item level with start date and expiration date. - Place another hold on item level with period overlaping this reserve. - Check you are warned about an existing reserve. 4 (opac side): - Do the same than for staff side. Instead of a warn, reserve is prevented. 5: - Place a hold on title (which has only one items) level with start date and expiration date. - Try to checkout the unique item from this title with period overlaping the reserve period. - Check you are warned about an existing reserve 6: - Place a hold on title (which has more than one items) level with start date and expiration date. - Checkout an item from this title with period overlaping the reserve period. - Check you are NOT warned about an existing reserve. 7: - Place a hold on item level with start date and expiration date. - Checkout this item period overlaping the reserve period. - Check you are warned about an existing reserve 8: - Create a checkout (i.e from ${TODAY} to ${TODAY + 10 days}), - Place a hold on the same item from ${TODAY + 11 days} to ${TODAY + 30 days}), - Check that you cannot renew the checkout.
Patch rebased on master
Created attachment 98424 [details] [review] Bug 15261: Check if checkout/reserve request overlaps existing reserves When checking out or placing hold, we should check if an existing reserve whose period overlap exists. - A user places a hold from opac whose requested period overlaps with an existing reserve period => prevent reserve - A librarian places a hold from staff whose requested period overlaps with an existing reserve period => Warn librarian (Ask for confirmation) - A librarian makes a checkout from staff whose requested period overlaps with an existing reserve period => Warn librarian (Ask for confirmation) Test plan: Enable syspref: AllowHoldDateInFuture OPACAllowHoldDateInFuture PreventChechoutOnSameReservePeriod and PreventReservesOnSamePeriod 1 (staff side): - Place a hold on title (which has only one items) level with start date and expiration date. - Place another hold (also title level) with period overlaping this reserve. - Check you are warned about an existing reserve 2 (staff side): - Place a hold on title (which has more than one items) level with start date and expiration date. - Place another hold (also title level) with period overlaping this reserve. - Check you are NOT warned about an existing reserve. Because it remains at least one item not reserved. 3 (staff side): - Place a hold on item level with start date and expiration date. - Place another hold on item level with period overlaping this reserve. - Check you are warned about an existing reserve. 4 (opac side): - Do the same than for staff side. Instead of a warn, reserve is prevented. 5: - Place a hold on title (which has only one items) level with start date and expiration date. - Try to checkout the unique item from this title with period overlaping the reserve period. - Check you are warned about an existing reserve 6: - Place a hold on title (which has more than one items) level with start date and expiration date. - Checkout an item from this title with period overlaping the reserve period. - Check you are NOT warned about an existing reserve. 7: - Place a hold on item level with start date and expiration date. - Checkout this item period overlaping the reserve period. - Check you are warned about an existing reserve 8: - Create a checkout (i.e from ${TODAY} to ${TODAY + 10 days}), - Place a hold on the same item from ${TODAY + 11 days} to ${TODAY + 30 days}), - Check that you cannot renew the checkout.
Patch put on biblibre sandbox 1 1 : impossible to place a hold from staff : First click on Place hold button in request.pl do nothing ; second click makes browser do something but next page never displays and reserve is not added (tested in firefox and chromium)
Apparently holds are broken on master (bug 24410). We better wait for this bug to be resolved before rebasing it again.
Resetting status to Needs Signoff now that bug 24410 is pushed to master
tested on biblibre sandbox1 all tests OK One remark on test 6 : when there are several items, and hold is placed on title, there is no warn when checking out on item, OK. I think we could be warned if all items are checked out with overlap, maybe when checking out the last available item, as no more item is available for hold then. But this could be be an improvement.
Patch tested with a sandbox, by Laurence Rault <laurence.rault@biblibre.com>
Created attachment 98672 [details] [review] Bug 15261: Check if checkout/reserve request overlaps existing reserves When checking out or placing hold, we should check if an existing reserve whose period overlap exists. - A user places a hold from opac whose requested period overlaps with an existing reserve period => prevent reserve - A librarian places a hold from staff whose requested period overlaps with an existing reserve period => Warn librarian (Ask for confirmation) - A librarian makes a checkout from staff whose requested period overlaps with an existing reserve period => Warn librarian (Ask for confirmation) Test plan: Enable syspref: AllowHoldDateInFuture OPACAllowHoldDateInFuture PreventChechoutOnSameReservePeriod and PreventReservesOnSamePeriod 1 (staff side): - Place a hold on title (which has only one items) level with start date and expiration date. - Place another hold (also title level) with period overlaping this reserve. - Check you are warned about an existing reserve 2 (staff side): - Place a hold on title (which has more than one items) level with start date and expiration date. - Place another hold (also title level) with period overlaping this reserve. - Check you are NOT warned about an existing reserve. Because it remains at least one item not reserved. 3 (staff side): - Place a hold on item level with start date and expiration date. - Place another hold on item level with period overlaping this reserve. - Check you are warned about an existing reserve. 4 (opac side): - Do the same than for staff side. Instead of a warn, reserve is prevented. 5: - Place a hold on title (which has only one items) level with start date and expiration date. - Try to checkout the unique item from this title with period overlaping the reserve period. - Check you are warned about an existing reserve 6: - Place a hold on title (which has more than one items) level with start date and expiration date. - Checkout an item from this title with period overlaping the reserve period. - Check you are NOT warned about an existing reserve. 7: - Place a hold on item level with start date and expiration date. - Checkout this item period overlaping the reserve period. - Check you are warned about an existing reserve 8: - Create a checkout (i.e from ${TODAY} to ${TODAY + 10 days}), - Place a hold on the same item from ${TODAY + 11 days} to ${TODAY + 30 days}), - Check that you cannot renew the checkout. Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Hi Alex, can you please rebase and test this patch really carefully? I looked at the code a while ago and had a feeling that some things probably weren't quite right due to previous rebasing. 98672 - Bug 15261: Check if checkout/reserve request overlaps existing reserves Apply? [(y)es, (n)o, (i)nteractive] y Applying: Bug 15261: Check if checkout/reserve request overlaps existing reserves Using index info to reconstruct a base tree... M C4/Circulation.pm M C4/Reserves.pm M Koha/DateUtils.pm M circ/circulation.pl M installer/data/mysql/sysprefs.sql M koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref M koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt M opac/opac-reserve.pl M reserve/placerequest.pl M svc/renew M t/db_dependent/Circulation.t Falling back to patching base and 3-way merge... Auto-merging t/db_dependent/Circulation.t Auto-merging svc/renew Auto-merging reserve/placerequest.pl Auto-merging opac/opac-reserve.pl Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref Auto-merging installer/data/mysql/sysprefs.sql Auto-merging circ/circulation.pl Auto-merging Koha/DateUtils.pm Auto-merging C4/Reserves.pm Auto-merging C4/Circulation.pm CONFLICT (content): Merge conflict in C4/Circulation.pm
Created attachment 106944 [details] [review] Bug 15261: Check if checkout/reserve request overlaps existing reserves When checking out or placing hold, we should check if an existing reserve whose period overlap exists. - A user places a hold from opac whose requested period overlaps with an existing reserve period => prevent reserve - A librarian places a hold from staff whose requested period overlaps with an existing reserve period => Warn librarian (Ask for confirmation) - A librarian makes a checkout from staff whose requested period overlaps with an existing reserve period => Warn librarian (Ask for confirmation) Test plan: Enable syspref: AllowHoldDateInFuture OPACAllowHoldDateInFuture PreventChechoutOnSameReservePeriod and PreventReservesOnSamePeriod 1 (staff side): - Place a hold on title (which has only one items) level with start date and expiration date. - Place another hold (also title level) with period overlaping this reserve. - Check you are warned about an existing reserve 2 (staff side): - Place a hold on title (which has more than one items) level with start date and expiration date. - Place another hold (also title level) with period overlaping this reserve. - Check you are NOT warned about an existing reserve. Because it remains at least one item not reserved. 3 (staff side): - Place a hold on item level with start date and expiration date. - Place another hold on item level with period overlaping this reserve. - Check you are warned about an existing reserve. 4 (opac side): - Do the same than for staff side. Instead of a warn, reserve is prevented. 5: - Place a hold on title (which has only one items) level with start date and expiration date. - Try to checkout the unique item from this title with period overlaping the reserve period. - Check you are warned about an existing reserve 6: - Place a hold on title (which has more than one items) level with start date and expiration date. - Checkout an item from this title with period overlaping the reserve period. - Check you are NOT warned about an existing reserve. 7: - Place a hold on item level with start date and expiration date. - Checkout this item period overlaping the reserve period. - Check you are warned about an existing reserve 8: - Create a checkout (i.e from ${TODAY} to ${TODAY + 10 days}), - Place a hold on the same item from ${TODAY + 11 days} to ${TODAY + 30 days}), - Check that you cannot renew the checkout. Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
working on rebase right now :)
Created attachment 106949 [details] [review] Bug 15261: (QA follow-up)
Bug 25758 changed signature of CanBookBeRenewed() adding $cron Update this patch in C4/Circulation.pm and svc/renew
diff --git a/circ/circulation.pl b/circ/circulation.pl index 5ec80c8f15..abfbb9306c 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -410,6 +410,10 @@ if (@$barcodes) { } unless($confirm_required) { my $switch_onsite_checkout = exists $messages->{ONSITE_CHECKOUT_WILL_BE_SWITCHED}; + if ( $cancelreserve eq 'cancel' ) { + CancelReserve({ reserve_id => $query->param('reserveid') }); + } + $cancelreserve = $cancelreserve eq 'revert' ? 'revert' : undef; CancelReserve does not exist anymore, see Bug 19059
Created attachment 120822 [details] [review] Bug 15261: Prevent checkout only if for a different borrower
@Julian : You had this fix "Prevent checkout only if for a different borrower" on 17.11. All patches need master rebase.
Just had a quick check at this patch. Seems the controls on the overlapping reserves is done in the interface code (opac/place-reserve.pl and so on) and not in C4/Reserves. This is then not checked for ILS-DI and RestAPI.
In CanBookBeRenewed(), $date_due is computed even if system preference PreventCheckoutOnSameReservePeriod is off. This has an impact on performance. We may add if PreventCheckoutOnSameReservePeriod earlier.
Created attachment 123405 [details] [review] Bug 15261: Always check preference PreventCheckoutOnSameReservePeriod first Proposed patch (may not apply on current master)
Created attachment 125793 [details] [review] Bug 15261: Check if checkout/reserve request overlaps existing reserves When checking out or placing hold, we should check if an existing reserve whose period overlap exists. - A user places a hold from opac whose requested period overlaps with an existing reserve period => prevent reserve - A librarian places a hold from staff whose requested period overlaps with an existing reserve period => Warn librarian (Ask for confirmation) - A librarian makes a checkout from staff whose requested period overlaps with an existing reserve period => Warn librarian (Ask for confirmation) Test plan: Enable syspref: AllowHoldDateInFuture OPACAllowHoldDateInFuture PreventChechoutOnSameReservePeriod and PreventReservesOnSamePeriod 1 (staff side): - Place a hold on title (which has only one items) level with start date and expiration date. - Place another hold (also title level) with period overlaping this reserve. - Check you are warned about an existing reserve 2 (staff side): - Place a hold on title (which has more than one items) level with start date and expiration date. - Place another hold (also title level) with period overlaping this reserve. - Check you are NOT warned about an existing reserve. Because it remains at least one item not reserved. 3 (staff side): - Place a hold on item level with start date and expiration date. - Place another hold on item level with period overlaping this reserve. - Check you are warned about an existing reserve. 4 (opac side): - Do the same than for staff side. Instead of a warn, reserve is prevented. 5: - Place a hold on title (which has only one items) level with start date and expiration date. - Try to checkout the unique item from this title with period overlaping the reserve period. - Check you are warned about an existing reserve 6: - Place a hold on title (which has more than one items) level with start date and expiration date. - Checkout an item from this title with period overlaping the reserve period. - Check you are NOT warned about an existing reserve. 7: - Place a hold on item level with start date and expiration date. - Checkout this item period overlaping the reserve period. - Check you are warned about an existing reserve 8: - Create a checkout (i.e from ${TODAY} to ${TODAY + 10 days}), - Place a hold on the same item from ${TODAY + 11 days} to ${TODAY + 30 days}), - Check that you cannot renew the checkout. Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Created attachment 125794 [details] [review] Bug 15261: (QA follow-up)
Created attachment 125795 [details] [review] Bug 15261: Prevent checkout only if for a different borrower
Created attachment 125796 [details] [review] Bug 15261: Always check preference PreventCheckoutOnSameReservePeriod first
(In reply to Fridolin Somers from comment #98) > Created attachment 123405 [details] [review] [review] > Bug 15261: Always check preference PreventCheckoutOnSameReservePeriod first > > Proposed patch (may not apply on current master) All patches rebased
Created attachment 131569 [details] [review] Bug 15261: Check if checkout/reserve request overlaps existing reserves When checking out or placing hold, we should check if an existing reserve whose period overlap exists. - A user places a hold from opac whose requested period overlaps with an existing reserve period => prevent reserve - A librarian places a hold from staff whose requested period overlaps with an existing reserve period => Warn librarian (Ask for confirmation) - A librarian makes a checkout from staff whose requested period overlaps with an existing reserve period => Warn librarian (Ask for confirmation) Test plan: Enable syspref: AllowHoldDateInFuture OPACAllowHoldDateInFuture PreventChechoutOnSameReservePeriod and PreventReservesOnSamePeriod 1 (staff side): - Place a hold on title (which has only one items) level with start date and expiration date. - Place another hold (also title level) with period overlaping this reserve. - Check you are warned about an existing reserve 2 (staff side): - Place a hold on title (which has more than one items) level with start date and expiration date. - Place another hold (also title level) with period overlaping this reserve. - Check you are NOT warned about an existing reserve. Because it remains at least one item not reserved. 3 (staff side): - Place a hold on item level with start date and expiration date. - Place another hold on item level with period overlaping this reserve. - Check you are warned about an existing reserve. 4 (opac side): - Do the same than for staff side. Instead of a warn, reserve is prevented. 5: - Place a hold on title (which has only one items) level with start date and expiration date. - Try to checkout the unique item from this title with period overlaping the reserve period. - Check you are warned about an existing reserve 6: - Place a hold on title (which has more than one items) level with start date and expiration date. - Checkout an item from this title with period overlaping the reserve period. - Check you are NOT warned about an existing reserve. 7: - Place a hold on item level with start date and expiration date. - Checkout this item period overlaping the reserve period. - Check you are warned about an existing reserve 8: - Create a checkout (i.e from ${TODAY} to ${TODAY + 10 days}), - Place a hold on the same item from ${TODAY + 11 days} to ${TODAY + 30 days}), - Check that you cannot renew the checkout. Signed-off-by: Laurence Rault <laurence.rault@biblibre.com> https://bugs.koha-community.org/show_bug.cgi?id=1526
Created attachment 131570 [details] [review] Bug 15261: (QA follow-up) https://bugs.koha-community.org/show_bug.cgi?id=1526
Created attachment 131571 [details] [review] Bug 15261: Prevent checkout only if for a different borrower https://bugs.koha-community.org/show_bug.cgi?id=1526
Created attachment 131572 [details] [review] Bug 15261: Always check preference PreventCheckoutOnSameReservePeriod first https://bugs.koha-community.org/show_bug.cgi?id=1526
Created attachment 131573 [details] [review] Bug 15261: Trying to fix after rebase https://bugs.koha-community.org/show_bug.cgi?id=1526
(In reply to Henri-Damien LAURENT from comment #108) > Created attachment 131573 [details] [review] [review] > Bug 15261: Trying to fix after rebase > > https://bugs.koha-community.org/show_bug.cgi?id=1526 Careful you added warns (for debug I bet) : if ( C4::Context->preference("PreventCheckoutOnSameReservePeriod") ) { + warn $date_due; + warn "Inside"; unless ($date_due) {
Ouch, koha-tmpl/intranet-tmpl/prog/en/modules/reserve/placerequest.tt is using obsolete YUI : <div id="doc3" class="yui-t2"> <div id="bd"> <div id="yui-main"> <div class="yui-b">
(In reply to Henri-Damien LAURENT from comment #108) > Created attachment 131573 [details] [review] [review] > Bug 15261: Trying to fix after rebase > > https://bugs.koha-community.org/show_bug.cgi?id=1526 Also missing in opac/opac-reserve.pl : if ( $canreserve && C4::Context->preference("PreventReservesOnSamePeriod") ) { - if ( ReservesOnSamePeriod($biblioNum, $itemNum, $startdate, $expiration_date) ) { + if ( C4::Reserves::ReservesOnSamePeriod($biblioNum, $itemNum, $startdate, $expiration_date) ) { $canreserve = 0; $failed_holds++; }
I think the idea was about 'booking' things in advance. Could we maybe replace this bug with: Bug 29002 - Add ability to book items ahead of time ?
Pref template must be fixed : choices yes/no must be 1/0
Is this something that could be replaced by the new bookings development?