Bugzilla – Attachment 146693 Details for
Bug 32373
Show date of restriction on patron screen
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32373: Show patron restriction date
Bug-32373-Show-patron-restriction-date.patch (text/plain), 2.75 KB, created by
Matt Blenkinsop
on 2023-02-15 15:50:31 UTC
(
hide
)
Description:
Bug 32373: Show patron restriction date
Filename:
MIME Type:
Creator:
Matt Blenkinsop
Created:
2023-02-15 15:50:31 UTC
Size:
2.75 KB
patch
obsolete
>From b56d52af54fd04f3cc1225967a6cfa7a6a2aa91f Mon Sep 17 00:00:00 2001 >From: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> >Date: Wed, 15 Feb 2023 15:48:34 +0000 >Subject: [PATCH] Bug 32373: Show patron restriction date > >This is a rebased submission following bug 31095 which removed the use of GetDebarments. This patch now uses $patron->restrictions to find the date and pass it to the template > >Test plan: >1) Create a restriction on a patron and navigate to that patron in Checkouts or the patron details page >2) There should be a message with details about the restriction but the creation date of the restriction won't be included in the message >3) Apply patch >4) The message should now say "Restricted since DATE" as in the screenshot attached. >5) Change the 'dateformat' syspref and refresh, the date should change to reflect the syspref >--- > circ/circulation.pl | 1 + > koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc | 2 +- > members/moremember.pl | 1 + > 3 files changed, 3 insertions(+), 1 deletion(-) > >diff --git a/circ/circulation.pl b/circ/circulation.pl >index 2cd85b6dad7..61065c726db 100755 >--- a/circ/circulation.pl >+++ b/circ/circulation.pl >@@ -269,6 +269,7 @@ if ($patron) { > $template->param( > 'userdebarred' => $patron->debarred, > 'debarredcomment' => $patron->debarredcomment, >+ 'debarredsince' => $patron->restrictions->search()->single->created, > ); > > if ( $patron->debarred ne "9999-12-31" ) { >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc >index db9c3430fcf..19ba6cee807 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc >@@ -58,7 +58,7 @@ > > [% IF ( userdebarred ) %] > <li class="userdebarred blocker"> >- <span class="circ-hlt"> Restricted:</span> Patron's account is restricted >+ <span class="circ-hlt"> Restricted since [% debarredsince | $KohaDates %]:</span> Patron's account is restricted > > [% IF ( userdebarreddate ) %] > until [% userdebarreddate | $KohaDates %] >diff --git a/members/moremember.pl b/members/moremember.pl >index 767b1a783b7..bf422d77498 100755 >--- a/members/moremember.pl >+++ b/members/moremember.pl >@@ -87,6 +87,7 @@ if ( $patron->is_debarred ) { > $template->param( > 'userdebarred' => $patron->debarred, > 'debarredcomment' => $patron->debarredcomment, >+ 'debarredsince' => $patron->restrictions->search()->single->created, > ); > > if ( $patron->debarred ne "9999-12-31" ) { >-- >2.37.1 (Apple Git-137.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 32373
:
144337
|
144796
|
144797
|
144807
|
144813
|
144815
|
144828
|
144931
|
144942
|
144943
|
144944
|
146693
|
147230
|
147763
|
147764