Bugzilla – Attachment 147764 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.92 KB, created by
Katrin Fischer
on 2023-03-04 15:37:17 UTC
(
hide
)
Description:
Bug 32373: Show patron restriction date
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2023-03-04 15:37:17 UTC
Size:
2.92 KB
patch
obsolete
>From c35a3a5780c3cb8234fab2a43203ebf27e09818e 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 > >Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> >Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com> >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > 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 2cd85b6dad..61065c726d 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 db9c3430fc..19ba6cee80 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 767b1a783b..bf422d7749 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.30.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 32373
:
144337
|
144796
|
144797
|
144807
|
144813
|
144815
|
144828
|
144931
|
144942
|
144943
|
144944
|
146693
|
147230
|
147763
| 147764