Bugzilla – Attachment 185710 Details for
Bug 37661
Disable/Enable Bookings
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37661: Add a new syspref EnableBooking
Bug-37661-Add-a-new-syspref-EnableBooking.patch (text/plain), 4.81 KB, created by
Baptiste Wojtkowski (bwoj)
on 2025-08-22 12:16:29 UTC
(
hide
)
Description:
Bug 37661: Add a new syspref EnableBooking
Filename:
MIME Type:
Creator:
Baptiste Wojtkowski (bwoj)
Created:
2025-08-22 12:16:29 UTC
Size:
4.81 KB
patch
obsolete
>From 14b05af57e22cf7a0ad092db5ebfcd8e936dbcbb Mon Sep 17 00:00:00 2001 >From: Baptiste <baptiste.wojtkowski@biblibre.com> >Date: Wed, 23 Jul 2025 15:39:03 +0200 >Subject: [PATCH] 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 >--- > .../bug_37661-EnableBooking_syspref.pl | 15 +++++++++++++++ > installer/data/mysql/mandatory/sysprefs.sql | 1 + > .../en/modules/admin/preferences/circulation.pref | 10 +++++++++- > 3 files changed, 25 insertions(+), 1 deletion(-) > create mode 100644 installer/data/mysql/atomicupdate/bug_37661-EnableBooking_syspref.pl > >diff --git a/installer/data/mysql/atomicupdate/bug_37661-EnableBooking_syspref.pl b/installer/data/mysql/atomicupdate/bug_37661-EnableBooking_syspref.pl >new file mode 100644 >index 0000000000..4a5c2182de >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_37661-EnableBooking_syspref.pl >@@ -0,0 +1,15 @@ >+use Modern::Perl; >+use Koha::Installer::Output qw(say_warning say_success say_info); >+ >+return { >+ bug_number => "37661", >+ description => "Add a way to enable/disable bookings", >+ up => sub { >+ my ($args) = @_; >+ my ( $dbh, $out ) = @$args{qw(dbh out)}; >+ >+ $dbh->do(q{INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES ('EnableBooking','1',NULL,'If enabled, activate every functionnalities related with Bookings module','YesNo')}); >+ >+ say_success( $out, "Added new system preference 'EnableBooking'" ); >+ }, >+}; >diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql >index 76954d2022..8561b1e985 100644 >--- a/installer/data/mysql/mandatory/sysprefs.sql >+++ b/installer/data/mysql/mandatory/sysprefs.sql >@@ -252,6 +252,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('EmailSMSSendDriverFromAddress', '', '', 'Email SMS send driver from address override', 'Free'), > ('EnableAdvancedCatalogingEditor','0','','Enable the Rancor advanced cataloging editor','YesNo'), > ('EnableBorrowerFiles','0',NULL,'If enabled, allows librarians to upload and attach arbitrary files to a borrower record.','YesNo'), >+('EnableBooking','1',NULL,'If enabled, activate every functionnalities related with Bookings module','YesNo'), > ('EnableExpiredPasswordReset', '0', NULL, 'Enable ability for patrons with expired password to reset their password directly', 'YesNo'), > ('EnableItemGroupHolds','0','','Enable item groups holds feature','YesNo'), > ('EnableItemGroups','0','','Enable the item groups feature','YesNo'), >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref >index 9cd73cfe85..1210472b72 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref >@@ -1534,4 +1534,12 @@ Circulation: > choices: > 1: Enable > 0: Disable >- - "the curbside pickup module." >\ No newline at end of file >+ - "the curbside pickup module." >+ >+ Booking module: >+ - >+ - pref: EnableBooking >+ choices: >+ 1: Enable >+ 0: Disable >+ - "the booking module." >-- >2.43.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 37661
:
184558
|
184559
|
184560
|
184561
|
184565
|
184566
|
184578
|
184579
|
184580
|
184581
|
184582
|
185150
|
185151
|
185152
|
185153
|
185154
|
185325
|
185326
|
185327
|
185329
|
185331
|
185333
| 185710 |
185711
|
185712
|
185713
|
185714
|
185715
|
185716