Bugzilla – Attachment 166231 Details for
Bug 32256
Self checkout batch mode
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32256: Use a new SCOBatchCheckoutsValidCategories syspref
Bug-32256-Use-a-new-SCOBatchCheckoutsValidCategori.patch (text/plain), 4.43 KB, created by
Andrew Fuerste-Henry
on 2024-05-06 13:46:51 UTC
(
hide
)
Description:
Bug 32256: Use a new SCOBatchCheckoutsValidCategories syspref
Filename:
MIME Type:
Creator:
Andrew Fuerste-Henry
Created:
2024-05-06 13:46:51 UTC
Size:
4.43 KB
patch
obsolete
>From dece86db3409716505c0d1c6291a96c6e59c544c Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Mon, 6 May 2024 03:42:57 +0000 >Subject: [PATCH] Bug 32256: Use a new SCOBatchCheckoutsValidCategories syspref > >So that this functionality can be controlled separately from staff-side batch checkouts > >Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org> >--- > ...d_SCOBatchCheckoutsValidCategories_syspref.pl | 16 ++++++++++++++++ > installer/data/mysql/mandatory/sysprefs.sql | 1 + > .../modules/admin/preferences/circulation.pref | 5 +++++ > opac/sco/sco-main.pl | 4 ++-- > 4 files changed, 24 insertions(+), 2 deletions(-) > create mode 100755 installer/data/mysql/atomicupdate/bug_32256_-_Add_SCOBatchCheckoutsValidCategories_syspref.pl > >diff --git a/installer/data/mysql/atomicupdate/bug_32256_-_Add_SCOBatchCheckoutsValidCategories_syspref.pl b/installer/data/mysql/atomicupdate/bug_32256_-_Add_SCOBatchCheckoutsValidCategories_syspref.pl >new file mode 100755 >index 0000000000..a308a22ac0 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_32256_-_Add_SCOBatchCheckoutsValidCategories_syspref.pl >@@ -0,0 +1,16 @@ >+use Modern::Perl; >+ >+return { >+ bug_number => "32256", >+ description => "Self checkout batch mode", >+ up => sub { >+ my ($args) = @_; >+ my ( $dbh, $out ) = @$args{qw(dbh out)}; >+ >+ $dbh->do( >+ q{ INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES ('SCOBatchCheckoutsValidCategories','',NULL,'Patron categories allowed to checkout in a batch while logged into Self Checkout','Free') } >+ ); >+ >+ say $out "Added system preference 'SCOBatchCheckoutsValidCategories'"; >+ }, >+}; >diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql >index d333de51b4..413810960d 100644 >--- a/installer/data/mysql/mandatory/sysprefs.sql >+++ b/installer/data/mysql/mandatory/sysprefs.sql >@@ -680,6 +680,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('RoutingSerials','1',NULL,'If ON, serials routing is enabled','YesNo'), > ('SavedSearchFilters', '0', NULL, 'Allow staff with permission to create/edit custom search filters', 'YesNo'), > ('SCOAllowCheckin','0','','If enabled, patrons may return items through the Web-based Self Checkout','YesNo'), >+('SCOBatchCheckoutsValidCategories','',NULL,'Patron categories allowed to checkout in a batch while logged into Self Checkout','Free'), > ('SCOLoadCheckoutsByDefault','1','','If enabled, load the list of a patrons checkouts when they log in to the Self Checkout','YesNo'), > ('SCOUserCSS','',NULL,'Add CSS to be included in the SCO module in an embedded <style> tag.','free'), > ('SCOUserJS','',NULL,'Define custom javascript for inclusion in the SCO module','free'), >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 b755959944..bc182fc31b 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 >@@ -1252,6 +1252,11 @@ Circulation: > - pref: SelfCheckAllowByIPRanges > class: short > - (Leave blank if not used. Use ranges or simple IP addresses separated by spaces, like <code>192.168.1.1 192.168.0.0/24</code>.) >+ - >+ - "Patron categories allowed to check out in a batch while logged into the self checkout system:" >+ - pref: SCOBatchCheckoutsValidCategories >+ choices: patron-categories >+ class: multiple > Course reserves: > - > - pref: UseCourseReserves >diff --git a/opac/sco/sco-main.pl b/opac/sco/sco-main.pl >index 28e0f74b25..d4f22aa0f7 100755 >--- a/opac/sco/sco-main.pl >+++ b/opac/sco/sco-main.pl >@@ -141,8 +141,8 @@ my $confirm_required = 0; > my $return_only = 0; > > my $batch_checkouts_allowed; >-if ( C4::Context->preference('BatchCheckouts') and $patron ) { >- my @batch_category_codes = split ',', C4::Context->preference('BatchCheckoutsValidCategories'); >+if ( $patron ) { >+ my @batch_category_codes = split ',', C4::Context->preference('SCOBatchCheckoutsValidCategories'); > my $categorycode = $patron->categorycode; > if ( $categorycode && grep { $_ eq $categorycode } @batch_category_codes ) { > $batch_checkouts_allowed = 1; >-- >2.39.2
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 32256
:
154866
|
154893
|
158585
|
158586
|
163878
|
163879
|
164571
|
164572
|
164573
|
164637
|
164638
|
164639
|
164640
|
164869
|
165719
|
165751
|
165752
|
165753
|
165754
|
165755
|
165978
|
165979
|
165980
|
165981
|
165982
|
165983
|
166179
|
166225
|
166226
|
166227
|
166228
|
166229
|
166230
|
166231
|
166320
|
166321
|
166322
|
166323
|
166324
|
166325
|
166326