https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36271
--- Comment #42 from Thibaud Guillot (thibaud_g) <[email protected]> --- (In reply to Martin Renvoize (ashimema) from comment #38) > Comment on attachment 172924 [details] [review] > Bug 36271: Add circulation rules for booking > > Review of attachment 172924 [details] [review]: > ----------------------------------------------------------------- > > ::: Koha/Booking.pm > @@ +53,5 @@ > > + { status => tooLongBookingPeriod, limit => $limit }, if the > > borrower has exceeded their maximum booking period. > > + { status => bookingPeriodNotValid }, if booking period is not > > valid (undef or equal to 0). > > +=cut > > + > > +sub can_be_booked_in_advance { > > Whilst this is great for the serverside logic, the rest of the bookings flow > on the client allows for upfront notification as soon as possible regarding > bookability. > > We should update the bookings modal to react to the choices made as soon as > possible as exemplified by recent bugs. > > You are 100% correct to take some of the other circulation rules into > account, age-related restrictions for example, but these should really have > been reported as independent bugs and clear code submitted to block at the > API level and also expose quickly in the Modal as soon as the patron is > selected for example. > > @@ +91,5 @@ > > + my $bookings_period_length = $rights->{bookings_period_length} || 0; > > + > > + return { status => 'noBookingsAllowed' } if > > defined($bookings_allowed_total) && $bookings_allowed_total == 0; > > + > > + my $bookings_per_item_count = Koha::Bookings->search( { patron_id => > > $patron->borrowernumber, item_id => $item->itemnumber } )->count(); > > Given that bookings are time bound and not a replenishing queue.. should > this rule also be time bound or clarified somehow. > > What does it mean? > * "Active" bookings waiting to be fulfilled? > * Bookings allowed in a year, a quarter, a term? > > ::: Koha/CirculationRules.pm > @@ +227,5 @@ > > + }, > > + bookings_per_item => { > > + scope => [ 'branchcode', 'categorycode', 'itemtype' ], > > + }, > > + bookings_period_length => { > > With bug 37354 now implemented using existing loan rules to construct > durations we probably don't need this one.. or we need to reconsider it > concerning the handling introduced in the aforementioned bug. Hi Martin and thanks for your feedback, sorry for the delay in my reply :) I've tried to clarify the “length of booking period” rule, I think it might be interesting to have this rule to limit patrons in their bookings. I've added a dependency to the OPAC patch precisely for this kind of test and easier integration. -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
