Bugzilla – Attachment 183569 Details for
Bug 40258
Option to only use item-level recalls and disable record-level recalls
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40258: Option to only use item-level recalls and disable record-level recalls
Bug-40258-Option-to-only-use-item-level-recalls-an.patch (text/plain), 8.50 KB, created by
Aleisha Amohia
on 2025-06-27 04:24:02 UTC
(
hide
)
Description:
Bug 40258: Option to only use item-level recalls and disable record-level recalls
Filename:
MIME Type:
Creator:
Aleisha Amohia
Created:
2025-06-27 04:24:02 UTC
Size:
8.50 KB
patch
obsolete
>From e66d7c330171e8d1edaf3cca935fcf421ebe27b6 Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Fri, 27 Jun 2025 04:17:55 +0000 >Subject: [PATCH] Bug 40258: Option to only use item-level recalls and disable > record-level recalls > >This enhancement adds a new system preference, RecallsRecordLevel, which can be turned off to only allow item-level recalls to be placed. It is enabled by default to match current default behaviour. When disabled, the option to 'recall next available item' is not shown. > >To test: > >1) Apply patch, install database updates and restart services >2) Log in to the staff interface and go to Koha Administration. Search for the UseRecalls system preference and ensure it is enabled. Notice the new RecallsRecordLevel system preference. Confirm the description makes sense. Make sure any recalls related circulation rules are set as needed. >3) Search for an item and check it out to Patron B. >4) Log in to the OPAC as Patron A and search for the item you just checked out to Patron B. >5) Go to Place a recall on this record. You should see both options - 'recall next available item' and 'recall a specific item'. Toggle between the options and confirm the items table shows when choosing the 'recall a specific item' option. Do not actually submit the recall request. >6) Go back to the staff interface and change the RecallsRecordLevel to 'item-level only' and Save. >7) Refresh the OPAC recall page. Notice that the 'recall next available item' option no longer shows, and the items table is already showing. > >Sponsored-by: Auckland University of Technology >--- > ..._40258_-_add_RecallsRecordLevel_syspref.pl | 17 ++++++++++++++++ > installer/data/mysql/mandatory/sysprefs.sql | 1 + > .../admin/preferences/circulation.pref | 14 +++++++++---- > .../bootstrap/en/modules/opac-recall.tt | 20 ++++++++++++++++--- > 4 files changed, 45 insertions(+), 7 deletions(-) > create mode 100755 installer/data/mysql/atomicupdate/bug_40258_-_add_RecallsRecordLevel_syspref.pl > >diff --git a/installer/data/mysql/atomicupdate/bug_40258_-_add_RecallsRecordLevel_syspref.pl b/installer/data/mysql/atomicupdate/bug_40258_-_add_RecallsRecordLevel_syspref.pl >new file mode 100755 >index 00000000000..a07c174fa16 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_40258_-_add_RecallsRecordLevel_syspref.pl >@@ -0,0 +1,17 @@ >+use Modern::Perl; >+use Koha::Installer::Output qw(say_warning say_success say_info); >+ >+return { >+ bug_number => "40258", >+ description => "Option to only use item-level recalls and disable record-level recalls", >+ up => sub { >+ my ($args) = @_; >+ my ( $dbh, $out ) = @$args{qw(dbh out)}; >+ >+ $dbh->do( >+ q{INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES ('RecallsRecordLevel', '1', NULL, 'If disabled, only item-level recalls could be requested, rather than a record-level recall for the next available item.', 'YesNo')} >+ ); >+ >+ say_success( $out, "Added new system preference 'RecallsRecordLevel'" ); >+ }, >+}; >diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql >index b8f35657707..f122d02d617 100644 >--- a/installer/data/mysql/mandatory/sysprefs.sql >+++ b/installer/data/mysql/mandatory/sysprefs.sql >@@ -667,6 +667,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('RealTimeHoldsQueue', '0', NULL, 'Enable updating the holds queue in real time', 'YesNo'), > ('RecallsLog','1',NULL,'If ON, log create/cancel/expire/fulfill actions on recalls','YesNo'), > ('RecallsMaxPickUpDelay','7',NULL,'Define the maximum time a recall can be awaiting pickup','Integer'), >+('RecallsRecordLevel', '1', NULL, 'If disabled, only item-level recalls could be requested, rather than a record-level recall for the next available item.', 'YesNo'), > ('RecordLocalUseOnReturn','0',NULL,'If ON, statistically record returns of unissued items as local use, instead of return','YesNo'), > ('RecordStaffUserOnCheckout', '0', '', 'If enabled, when an item is checked out, the user who checked out the item is recorded', 'YesNo'), > ('RedirectGuaranteeEmail', '0', NULL, 'Enable the ability to redirect guarantee email messages to guarantor.', '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 9cd73cfe859..b8d2f336af0 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 >@@ -1488,11 +1488,17 @@ Circulation: > - class: integer > - days. > - >+ - Recalls > - pref: UseRecalls > choices: >- 1: Use >- 0: "Don't use" >- - recalls. Make sure you configure <a href="/cgi-bin/koha/admin/smart-rules.pl">circulation and fine rules</a> for recalls once enabled. >+ 1: "are enabled" >+ 0: "are disabled" >+ - . When enabled, recalls can be placed >+ - pref: RecallsRecordLevel >+ choices: >+ 1: "at both the item-level and the record-level" >+ 0: "at the item-level only" >+ - . Make sure you configure <a href="/cgi-bin/koha/admin/smart-rules.pl">circulation and fine rules</a> for recalls once enabled. > > SIP2: > - >@@ -1534,4 +1540,4 @@ Circulation: > choices: > 1: Enable > 0: Disable >- - "the curbside pickup module." >\ No newline at end of file >+ - "the curbside pickup module." >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-recall.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-recall.tt >index 17930e97feb..ca09bed0844 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-recall.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-recall.tt >@@ -84,8 +84,18 @@ > <input type="text" name="expirationdate" id="expirationdate" size="20" class="flatpickr futuredate" /> > <span id="expiration-hint">[% INCLUDE 'date-format.inc' %]</span> > </li> >- <li class="level-option" style="display:none;"><label for="bibliolevel">Recall next available item</label> <input type="radio" name="type" id="bibliolevel" value="bibliolevel" checked /></li> >- <li class="level-option" style="display:none;"><label for="itemlevel">Recall a specific item</label> <input type="radio" name="type" id="itemlevel" value="itemlevel" /></li> >+ [% IF Koha.Preference('RecallsRecordLevel') %] >+ <li class="level-option" style="display:none;" >+ ><label for="bibliolevel">Recall next available item</label> <input type="radio" name="type" id="bibliolevel" value="bibliolevel" checked >+ /></li> >+ [% END %] >+ <li class="level-option" style="display:none;" >+ ><label for="itemlevel">Recall a specific item</label> [% IF Koha.Preference('RecallsRecordLevel') %] >+ <input type="radio" name="type" id="itemlevel" value="itemlevel" /> >+ [% ELSE %] >+ <input type="radio" name="type" id="itemlevel" value="itemlevel" checked /> >+ [% END %]</li >+ > > </ul> > > <table class="table table-bordered table-striped" id="items"> >@@ -190,7 +200,11 @@ > <script> > $(document).ready(function () { > $(".level-option").show(); >- $("#items").hide(); >+ [% IF Koha.Preference('RecallsRecordLevel') %] >+ $("#items").hide(); >+ [% ELSE %] >+ $("#items").show(); >+ [% END %] > $("#expiration-hint").hide(); > $("#itemlevel").click(function () { > if ($("#itemlevel").is(":checked")) { >-- >2.39.5
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 40258
: 183569