If libraries are not planning to use the bookings feature, there's no way to hide this option. Even if staff don’t have the manage_bookings permission, they can still set an item as bookable, but the “place booking” button won’t appear for them. It would be nice if the bookings feature could be set to enable/disable via a system preference, similar to EnablePointOfSale, EnableItemGroups, HouseboundModule, ERMModule, ILLModule, and PreservationModule.
*** Bug 38017 has been marked as a duplicate of this bug. ***
It would be nice if this Disable/Enable option also applied to the Bookings tab in the patron account. I have received several requests from libraries to hide this tab since they aren't using the Bookings feature.
24.11 bug 33736 brought 'bookings to pull' into the circ module - it would be nice if this global on/off could turn it off as well.
Created attachment 184558 [details] [review] [24.11] Bug 37661: Add a new syspref EnableBooking This patch makes the Booking module dependant of a new YesNo syspref: EnableBooking To do this, I tried and get all changes using the graph of Bug 29002 and got interrested in every tt change to make changes on this depend on the new syspref. File inside the booking module should not be amended. Here are the files I found relevant for each patch Bug 37737: - koha-tmpl/intranet-tmpl/prog/en/includes/patron-detail-tabs.inc - koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt Bug 37736: - koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation-home.tt Bug 29002: - koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc - koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/ISBDdetail.tt - koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/MARCdetail.tt - koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt - koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/imageviewer.tt - koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/labeledMARCdetail.tt - koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt
Created attachment 184559 [details] [review] [24.11] Bug 37661: Have 29002 depend on EnableBooking
Created attachment 184560 [details] [review] [24.11] Bug 37661: Have 37736 depend on Enable booking
Created attachment 184561 [details] [review] [24.11] Bug 37661: Have 37737 depend on EnableBooking
Created attachment 184565 [details] [review] Bu 37661: Have 36428 depend on EnableBooking
Created attachment 184566 [details] [review] [24.11] Bug 37661: Have 36428 depend on EnableBooking
Created attachment 184578 [details] [review] Bug 37661: Add a new syspref EnableBooking This patch makes the Booking module dependant of a new YesNo syspref: EnableBooking To do this, I tried and get all changes using the graph of Bug 29002 and got interrested in every tt change to make changes on this depend on the new syspref. File inside the booking module should not be amended. Here are the files I found relevant for each patch Bug 37737: - koha-tmpl/intranet-tmpl/prog/en/includes/patron-detail-tabs.inc - koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt Bug 37736: - koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation-home.tt Bug 29002: - koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc - koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/ISBDdetail.tt - koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/MARCdetail.tt - koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt - koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/imageviewer.tt - koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/labeledMARCdetail.tt - koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt TEST PLAN: 1 - Set "Bookable = 1" on a given item 2 - Make sure you know where are located - The field bookable on exemplaries - The button "Place booking" in item toolbae - The link "Bookings (0)" in item menu 3 - Apply patch and update database 4 - Check that every field listed in 2 - is still present 5 - Set the syspref "EnableBooking" to "Disable" 6 - Check that every field listed in 2 - is still present 7 - Browse Norme, ISBD, Marc, Items tabs + pages imageviewer.pl, labeledMARCdetail.pl and check that nothing is broken
Created attachment 184579 [details] [review] Bug 37661: Have 29002 depend on EnableBooking
Created attachment 184580 [details] [review] Bug 37661: Have 37736 depend on Enable booking
Created attachment 184581 [details] [review] Bug 37661: Have 37737 depend on EnableBooking
Created attachment 184582 [details] [review] Bug 37661: Have 36428 depend on EnableBooking
I received an error when trying to apply the patch to KTD. I'm not sure if I am missing a step? Error message: Applying: Bug 37661: Add a new syspref EnableBooking error: sha1 information is lacking or useless (installer/data/mysql/mandatory/sysprefs.sql). error: could not build fake ancestor Patch failed at 0001 Bug 37661: Add a new syspref EnableBooking
Hum, I just tried and reapply on the last main on top of "20313df192 Bug 40298: define select2 parent in patron search modal" and it seems working. Is your git repository up to date ?
That may have been it. I have updated and the patch applied correctly. After applying the patch and updating the database, the fields in step 2 were not present. The EnableBooking system preference came in disabled, which would explain why they were not present. I flipped the system preference to Enabled and the fields appeared as they should. The system preference appears to enable/disable Bookings. I did notice, the system preference overrides the Bookings checkbox in the item type configuration. If EnableBooking is enabled, it enables bookings for everything and does not reference the Item Type configuration checkbox. I would expect the system preference to reference the Item Type configuration.
I don't get your last point, do you think you should still be able to manage the attribute "booking" while EnableBookings is disabled ?
I would expect the EnableBookings to enable the feature, but the item type attribute should actually controls whether bookings are available or not, if that makes sense. This patch turns on bookings for all item types, overriding the item type attribute.
Created attachment 185150 [details] [review] Bug 37661: Add a new syspref EnableBooking This patch makes the Booking module dependant of a new YesNo syspref: EnableBooking To do this, I tried and get all changes using the graph of Bug 29002 and got interrested in every tt change to make changes on this depend on the new syspref. File inside the booking module should not be amended. Here are the files I found relevant for each patch Bug 37737: - koha-tmpl/intranet-tmpl/prog/en/includes/patron-detail-tabs.inc - koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt Bug 37736: - koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation-home.tt Bug 29002: - koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc - koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/ISBDdetail.tt - koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/MARCdetail.tt - koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt - koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/imageviewer.tt - koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/labeledMARCdetail.tt - koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt TEST PLAN: 1 - Set "Bookable = 1" on a given item 2 - Make sure you know where are located - The field bookable on exemplaries - The button "Place booking" in item toolbae - The link "Bookings (0)" in item menu 3 - Apply patch and update database 4 - Check that every field listed in 2 - is still present 5 - Set the syspref "EnableBooking" to "Disable" 6 - Check that every field listed in 2 - is still present 7 - Browse Norme, ISBD, Marc, Items tabs + pages imageviewer.pl, labeledMARCdetail.pl and check that nothing is broken Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Created attachment 185151 [details] [review] Bug 37661: Have 29002 depend on EnableBooking Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Created attachment 185152 [details] [review] Bug 37661: Have 37736 depend on Enable booking Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Created attachment 185153 [details] [review] Bug 37661: Have 37737 depend on EnableBooking Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Created attachment 185154 [details] [review] Bug 37661: Have 36428 depend on EnableBooking Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
(In reply to Esther Melander from comment #19) > I would expect the EnableBookings to enable the feature, but the item type > attribute should actually controls whether bookings are available or not, if > that makes sense. > > This patch turns on bookings for all item types, overriding the item type > attribute. I wasn't able to recreate this. With the system preference set to Enabled, I was only able to place bookings where the itemtype was set to bookable=1 or the individual item was set to bookable=1.
1. Find an item record and ensure it is not set to be bookable. 2. Verify the item type for the item is not set to be bookable. 3. Apply patch 4. Notice the system preference came in enabled by default. 5. Double check the item and see if it is now bookable - it should not be. Check others items with the same item type to make sure they are not bookable. Check other item types - they should not be bookable. 6. Enable the individual item as bookable. Run checks in step 5. Only the one item should be bookable. 7. Enable the item type as bookable. Check multiple items of the item type. They should all be bookable. 8. Select an item and mark it as not bookable. Notice the individual item should now not be bookable but the place booking link is still available and I can place a booking. I'm guessing this is set to be enabled by default so as not to disable any bookings with an upgrade.
(In reply to Esther Melander from comment #26) > 8. Select an item and mark it as not bookable. > > Notice the individual item should now not be bookable but the place booking > link is still available and I can place a booking. I cannot recreate what you've documented here. I have the patch applied and EnableBookings set to Enable. I have the BOOK itemtype set to be bookable. Biblio 344 has 3 books attached. I have them set to bookable Yes, No, and Follow Itemtype, respectively. When I place a booking, I can place it for Any item, the item with bookable=yes, or the item with bookable following the itemtype. I cannot place a booking for the item marked bookable:no
I must have had something wrong with my KTD. I shut it down and restarted and it worked as you described.
There are a lot of qa tool errors to be corrected, and merge markers in circulation-home.tt.
Created attachment 185325 [details] [review] Bug 37661: Add a new syspref EnableBooking This patch makes the Booking module dependant of a new YesNo syspref: EnableBooking To do this, I tried and get all changes using the graph of Bug 29002 and got interrested in every tt change to make changes on this depend on the new syspref. File inside the booking module should not be amended. Here are the files I found relevant for each patch Bug 37737: - koha-tmpl/intranet-tmpl/prog/en/includes/patron-detail-tabs.inc - koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt Bug 37736: - koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation-home.tt Bug 29002: - koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc - koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/ISBDdetail.tt - koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/MARCdetail.tt - koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt - koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/imageviewer.tt - koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/labeledMARCdetail.tt - koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt TEST PLAN: 1 - Set "Bookable = 1" on a given item 2 - Make sure you know where are located - The field bookable on exemplaries - The button "Place booking" in item toolbae - The link "Bookings (0)" in item menu 3 - Apply patch and update database 4 - Check that every field listed in 2 - is still present 5 - Set the syspref "EnableBooking" to "Disable" 6 - Check that every field listed in 2 - is still present 7 - Browse Norme, ISBD, Marc, Items tabs + pages imageviewer.pl, labeledMARCdetail.pl and check that nothing is broken
Created attachment 185326 [details] [review] Bug 37661: Have 29002 depend on EnableBooking
Created attachment 185327 [details] [review] Bug 37661: Have 37737 depend on EnableBooking
Created attachment 185329 [details] [review] Bug 37661: Have 36428 depend on EnableBooking
Created attachment 185331 [details] [review] Bug 37661: Have 37736 depend on Enable booking
Created attachment 185333 [details] [review] Bug 37661: Tidy
Note for QA/Release manager, the names are in order to better isolate if some patch are not covered by this revert, but please squash it before pushing :)
I think this is an important change to make, as I don't think bug 29002 should've been pushed without a system preference. But what is going on with these patches? It looks like a lot of these should be on the bugs they're named after. There shouldn't need to be a "Tidy" patch these days either.
Comment on attachment 185326 [details] [review] Bug 37661: Have 29002 depend on EnableBooking Review of attachment 185326 [details] [review]: ----------------------------------------------------------------- ::: koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/ISBDdetail.tt @@ +82,4 @@ > <script> > dayjs.extend(window.dayjs_plugin_isSameOrBefore); > </script> > + <script>dayjs.extend(window.dayjs_plugin_isSameOrAfter)</script> This looks like a merge error of some kind?
(In reply to David Cook from comment #37) > But what is going on with these patches? It looks like a lot of these should > be on the bugs they're named after. There shouldn't need to be a "Tidy" > patch these days either. Actually, it looks like some of those bug numbers are totally wrong. Bug 37737 - Users with 'execute_reports' permission can create reports 23.11 and lower Bug 37736 - installing koha on wsl debian So not sure what's going on there either...
Hi, thank you for your attention to the patch :) As I mentioned in Comment 36, I have split the patch into multiple patches in order to better check which bugs have been "reverted", and how they have been reverted. Once PQA I'll squash everything. There is an issue that I was pretty sure I had fixed with the name of some commits, which are 33737 and 33737
(In reply to David Cook from comment #38) > Comment on attachment 185326 [details] [review] [review] > Bug 37661: Have 29002 depend on EnableBooking > > Review of attachment 185326 [details] [review] [review]: > ----------------------------------------------------------------- > > ::: koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/ISBDdetail.tt > @@ +82,4 @@ > > <script> > > dayjs.extend(window.dayjs_plugin_isSameOrBefore); > > </script> > > + <script>dayjs.extend(window.dayjs_plugin_isSameOrAfter)</script> > > This looks like a merge error of some kind? Hum.. I don't know how this happened O.o
Created attachment 185710 [details] [review] Bug 37661: Add a new syspref EnableBooking This patch makes the Booking module dependant of a new YesNo syspref: EnableBooking To do this, I tried and get all changes using the graph of Bug 29002 and got interrested in every tt change to make changes on this depend on the new syspref. File inside the booking module should not be amended. Here are the files I found relevant for each patch Bug 37737: - koha-tmpl/intranet-tmpl/prog/en/includes/patron-detail-tabs.inc - koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt Bug 37736: - koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation-home.tt Bug 29002: - koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc - koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/ISBDdetail.tt - koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/MARCdetail.tt - koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt - koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/imageviewer.tt - koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/labeledMARCdetail.tt - koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt TEST PLAN: 1 - Set "Bookable = 1" on a given item 2 - Make sure you know where are located - The field bookable on exemplaries - The button "Place booking" in item toolbae - The link "Bookings (0)" in item menu 3 - Apply patch and update database 4 - Check that every field listed in 2 - is still present 5 - Set the syspref "EnableBooking" to "Disable" 6 - Check that every field listed in 2 - is still present 7 - Browse Norme, ISBD, Marc, Items tabs + pages imageviewer.pl, labeledMARCdetail.pl and check that nothing is broken
Created attachment 185711 [details] [review] Bug 37661: [squash me] Have 29002 depend on EnableBooking
Created attachment 185712 [details] [review] Bug 37661: [squash me] Have 33737 depend on EnableBooking
Created attachment 185713 [details] [review] Bug 37661: [squash me] Have 36428 depend on EnableBooking
Created attachment 185714 [details] [review] Bug 37661: [squash me] Have 33736 depend on Enable booking
Created attachment 185715 [details] [review] Bug 37661: [squash me] Tidy
Created attachment 185716 [details] [review] Bug 37661: (follow-up) [squash me] remove useless lines