Bugzilla – Attachment 190747 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.31 KB, created by
David Nind
on 2025-12-27 19:30:52 UTC
(
hide
)
Description:
Bug 40258: Option to only use item-level recalls and disable record-level recalls
Filename:
MIME Type:
Creator:
David Nind
Created:
2025-12-27 19:30:52 UTC
Size:
8.31 KB
patch
obsolete
>From e61433bcf81aa533a9401b9029823ba0d62413d9 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 >Signed-off-by: David Nind <david@davidnind.com> >--- > ..._40258_-_add_RecallsRecordLevel_syspref.pl | 17 ++++++++++++++++ > installer/data/mysql/mandatory/sysprefs.sql | 1 + > .../admin/preferences/circulation.pref | 12 ++++++++--- > .../bootstrap/en/modules/opac-recall.tt | 20 ++++++++++++++++--- > 4 files changed, 44 insertions(+), 6 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 0000000000..a07c174fa1 >--- /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 35a5d15dd8..bfae3e81f1 100644 >--- a/installer/data/mysql/mandatory/sysprefs.sql >+++ b/installer/data/mysql/mandatory/sysprefs.sql >@@ -670,6 +670,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 82070552d6..0786c30777 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 >@@ -1494,11 +1494,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: > - >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 9c58aa7343..1618673940 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-recall.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-recall.tt >@@ -91,8 +91,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"> >@@ -197,7 +207,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
|
190635
| 190747