Bugzilla – Attachment 170829 Details for
Bug 34643
Split CircConfirmItemParts for self-checkout and self-checkin
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34643: Split CircConfirmItemParts for self-checkout and self-checkin
Bug-34643-Split-CircConfirmItemParts-for-self-chec.patch (text/plain), 5.19 KB, created by
Kyle M Hall (khall)
on 2024-08-28 16:44:36 UTC
(
hide
)
Description:
Bug 34643: Split CircConfirmItemParts for self-checkout and self-checkin
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2024-08-28 16:44:36 UTC
Size:
5.19 KB
patch
obsolete
>From 25a24e71e47a878471e8f601d23bc6974fa576dc Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Tue, 29 Aug 2023 12:48:11 -0400 >Subject: [PATCH] Bug 34643: Split CircConfirmItemParts for self-checkout and > self-checkin > >Many libraries wish to be able to allow self-check for multi-part items while requesting librarians to verify the parts when checking out/in at the desk. It makes sense to split CircConfirmItemParts into three prefs such that the feature can be enabled/disabled for SCO and SCI independently. > >Test Plan: >1) Apply this patch >2) Enable SCO and SCI >3) Set CircConfirmItemPartsSCO to "Don't allow" >4) Attempt to checkout out an item with materials via SCO, it should > fail >5) Set CircConfirmItemPartsSCO to "Allow" >6) Repeat step 4, it should succeed >7) Set CircConfirmItemPartsSCI to "Don't allow" >8) Attempt to check in the item via SCI, it should fail >9) Attempt to check in the item via SCO, it should fail >9) Set CircConfirmItemPartsSCI to "Allow" >10) Attempt to check in the item via SCO and SCI, it should succeed! > >Signed-off-by: AFHDubCoLib <andrewfh@dubcolib.org> >--- > .../data/mysql/atomicupdate/bug_34643.pl | 22 +++++++++++++++++++ > .../admin/preferences/circulation.pref | 12 ++++++++++ > opac/sci/sci-main.pl | 2 +- > opac/sco/sco-main.pl | 5 ++++- > 4 files changed, 39 insertions(+), 2 deletions(-) > create mode 100755 installer/data/mysql/atomicupdate/bug_34643.pl > >diff --git a/installer/data/mysql/atomicupdate/bug_34643.pl b/installer/data/mysql/atomicupdate/bug_34643.pl >new file mode 100755 >index 00000000000..a23965c2b0f >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_34643.pl >@@ -0,0 +1,22 @@ >+use Modern::Perl; >+ >+return { >+ bug_number => "34643", >+ description => "Split CircConfirmItemParts for self-checkout and self-checkin", >+ up => sub { >+ my ($args) = @_; >+ my ( $dbh, $out ) = @$args{qw(dbh out)}; >+ >+ my $val = C4::Context->preference('CircConfirmItemParts'); >+ $dbh->do( >+ q{ >+ INSERT IGNORE INTO systempreferences VALUES >+ ("CircConfirmItemPartsSCO", ?, NULL, "Deny checkout of multipart items for self-checkout", "Yes/No" ), >+ ("CircConfirmItemPartsSCI", ?, NULL, "Deny checkout of multipart items for self-checkin", "Yes/No"); >+ }, undef, $val, $val >+ ); >+ >+ say $out "Added new system preference 'CircConfirmItemPartsSCO'"; >+ say $out "Added new system preference 'CircConfirmItemPartsSCI'"; >+ }, >+}; >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 76983576a6a..98cfe64f617 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 >@@ -12,6 +12,18 @@ Circulation: > 1: "Require" > 0: "Don't require" > - staff to confirm that all parts of an item are present at checkin/checkout. >+ - >+ - pref: CircConfirmItemPartsSCO >+ choices: >+ 1: "Don't allow" >+ 0: "Allow" >+ - multi-part items to be checked out via the web-based self checkout module. >+ - >+ - pref: CircConfirmItemPartsSCI >+ choices: >+ 1: "Don't allow" >+ 0: "Allow" >+ - multi-part items to be checked in via the web-based self check-in or self checkout modules. > - > - pref: AutoSwitchPatron > choices: >diff --git a/opac/sci/sci-main.pl b/opac/sci/sci-main.pl >index d2fdca9e103..38d698b23f9 100755 >--- a/opac/sci/sci-main.pl >+++ b/opac/sci/sci-main.pl >@@ -68,7 +68,7 @@ if ( $op eq 'cud-check_in' ) { > my ( $success, $messages, $checkout, $patron ); > my $item = Koha::Items->find( { barcode => $barcode } ); > my $human_required = 0; >- if ( C4::Context->preference("CircConfirmItemParts") >+ if ( C4::Context->preference("CircConfirmItemPartsSCI") > && defined($item) > && $item->materials ) > { >diff --git a/opac/sco/sco-main.pl b/opac/sco/sco-main.pl >index bf923c754f9..af963054906 100755 >--- a/opac/sco/sco-main.pl >+++ b/opac/sco/sco-main.pl >@@ -161,7 +161,7 @@ if ( $patron && $op eq "cud-returnbook" && $allowselfcheckreturns ) { > > foreach my $barcode (@$barcodes) { > my $item = Koha::Items->find( { barcode => $barcode } ); >- if ( $success && C4::Context->preference("CircConfirmItemParts") ) { >+ if ( $success && C4::Context->preference("CircConfirmItemPartsSCI") ) { > if ( defined($item) > && $item->materials ) > { >@@ -200,6 +200,9 @@ if ( $patron && $op eq "cud-returnbook" && $allowselfcheckreturns ) { > 0, > C4::Context->preference("AllowItemsOnHoldCheckoutSCO") > ); >+ >+ delete $needconfirm->{ADDITIONAL_MATERIALS} unless C4::Context->preference("CircConfirmItemPartsSCO"); >+ > my $issue_error; > if ( $confirm_required = scalar keys %$needconfirm ) { > for my $error ( >-- >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 34643
:
154910
|
159113
|
163145
|
163318
|
163657
|
163675
| 170829 |
170830
|
170831
|
170832