Bugzilla – Attachment 152875 Details for
Bug 31357
Separate holds history from intranetreadinghistory
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31357: Separate holds history from intranetreadinghistory
Bug-31357-Separate-holds-history-from-intranetread.patch (text/plain), 5.85 KB, created by
Kyle M Hall (khall)
on 2023-06-29 18:20:38 UTC
(
hide
)
Description:
Bug 31357: Separate holds history from intranetreadinghistory
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2023-06-29 18:20:38 UTC
Size:
5.85 KB
patch
obsolete
>From 0d5528ecaa253e06e7d722fdbb5b6f5a8aee2320 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Thu, 29 Jun 2023 14:17:09 -0400 >Subject: [PATCH] Bug 31357: Separate holds history from intranetreadinghistory > >Currently the system preference intranetreadinghistory determines visibility of both circulation history and holds history tabs in the patron record. It would be helpful to allow the option of setting each of those independently. > >Specifically, libraries have requested the option of being able to view the holds history in a patron record without having to enable viewing of the circulation history. > >Test Plan: >1) Apply this patch >2) Restart all the things! >3) Run updatadatabase.pl >4) Verify the new syspref intranetReadingHistoryHolds has the same value > as the existing syspref intranetreadinghistory >5) Disable intranetreadinghistory, enable intranetReadingHistoryHolds >6) Verify you can view a patron's holds history but not reading history >--- > C4/Auth.pm | 1 + > installer/data/mysql/atomicupdate/bug_31357.pl | 15 +++++++++++++++ > .../intranet-tmpl/prog/en/includes/circ-menu.inc | 2 +- > .../en/modules/admin/preferences/patrons.pref | 8 +++++++- > .../prog/en/modules/members/holdshistory.tt | 2 +- > 5 files changed, 25 insertions(+), 3 deletions(-) > create mode 100644 installer/data/mysql/atomicupdate/bug_31357.pl > >diff --git a/C4/Auth.pm b/C4/Auth.pm >index 07afd24018..0038f63cd7 100644 >--- a/C4/Auth.pm >+++ b/C4/Auth.pm >@@ -485,6 +485,7 @@ sub get_template_and_user { > intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"), > IntranetFavicon => C4::Context->preference("IntranetFavicon"), > intranetreadinghistory => C4::Context->preference("intranetreadinghistory"), >+ intranetReadingHistoryHolds => C4::Context->preference("intranetReadingHistoryHolds"), > intranetstylesheet => C4::Context->preference("intranetstylesheet"), > IntranetUserCSS => C4::Context->preference("IntranetUserCSS"), > IntranetUserJS => C4::Context->preference("IntranetUserJS"), >diff --git a/installer/data/mysql/atomicupdate/bug_31357.pl b/installer/data/mysql/atomicupdate/bug_31357.pl >new file mode 100644 >index 0000000000..cd5b15f05e >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_31357.pl >@@ -0,0 +1,15 @@ >+use Modern::Perl; >+ >+return { >+ bug_number => "31357", >+ description => "Add new system preference intranetReadingHistoryHolds", >+ up => sub { >+ my ($args) = @_; >+ my ($dbh, $out) = @$args{qw(dbh out)}; >+ $dbh->do(q{ >+ INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) SELECT >+ 'intranetReadingHistoryHolds', value, '', 'If ON, Holds history is enabled for all patrons', 'YesNo' >+ FROM systempreferences WHERE variable = 'intranetreadinghistory'; >+ }); >+ }, >+} >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc >index eeb959972f..c8af24bbcb 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc >@@ -151,7 +151,7 @@ > [% END %] > [% END %] > [% IF CAN_user_borrowers_edit_borrowers %] >- [% IF ( intranetreadinghistory ) %] >+ [% IF ( intranetReadingHistoryHolds ) %] > [% IF ( holdshistoryview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/holdshistory.pl?borrowernumber=[% patron.borrowernumber | uri %]">Holds history</a></li> > [% END %] > [% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref >index 32cd34f706..105fd6e0c2 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref >@@ -26,7 +26,13 @@ Patrons: > choices: > 1: "Allow" > 0: "Don't allow" >- - "staff to access a patron's checkout and hold history (checkout history is still stored, regardless of staff being allowed access or not)." >+ - "staff to access a patron's checkout (checkout history is still stored, regardless of staff being allowed access or not)." >+ - >+ - pref: intranetReadingHistoryHolds >+ choices: >+ 1: "Allow" >+ 0: "Don't allow" >+ - "staff to access a patron's hold history (hold history is still stored, regardless of staff being allowed access or not)." > - > - "When deleting a patron who owns public or shared lists," > - pref: ListOwnershipUponPatronDeletion >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/holdshistory.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/holdshistory.tt >index a2e82c8775..d99c557595 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/holdshistory.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/holdshistory.tt >@@ -39,7 +39,7 @@ > [% INCLUDE 'members-toolbar.inc' %] > <h1>Holds history</h1> > >-[% UNLESS Koha.Preference('intranetreadinghistory') %] >+[% UNLESS Koha.Preference('intranetReadingHistoryHolds') %] > <div class="dialog alert">Staff members are not allowed to access patron's holds history</div> > [% ELSIF is_anonymous %] > <div class="dialog alert">This is the anonymous patron, so no holds history is displayed.</div> >-- >2.39.1
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 31357
:
152875
|
152877
|
156547