Bugzilla – Attachment 33619 Details for
Bug 13261
Better check in message for patrons with indefinite restriction
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13261 - Better check in message for patrons with indefinite restricition
Bug-13261---Better-check-in-message-for-patrons-wi.patch (text/plain), 4.92 KB, created by
Frédéric Demians
on 2014-11-17 16:43:41 UTC
(
hide
)
Description:
Bug 13261 - Better check in message for patrons with indefinite restricition
Filename:
MIME Type:
Creator:
Frédéric Demians
Created:
2014-11-17 16:43:41 UTC
Size:
4.92 KB
patch
obsolete
>From 1d86cd513f98e10d5f6e6d1775868bd711e6c84f Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Marc=20V=C3=A9ron?= <veron@veron.ch> >Date: Sat, 15 Nov 2014 17:14:10 +0100 >Subject: [PATCH] Bug 13261 - Better check in message for patrons with > indefinite restricition > >This patch adds a better check in message for patrons with indefinite restriction. > >To test: >Check out an item to a patron. >Add a manual restriction without expiry date to that patron. >Check in the item. > >Without patch, the checkin message reads: >Reminder: Patron was earlier restricted until 9999-12-31 > >Apply patch and repeat steps above. >The message should now read: >Reminder: Patron has a restriction (no expiry date) > >NOTE: Changed wording at two places following Owen's suggestion. New: "Patron >has an indefinite restriction" > >Signed-off-by: Frederic Demians <f.demians@tamil.fr> > >Thanks Marc for catching this case. I was thinking like you that the wording >sounded strange while playing with bug 13242. Merge the original patch and the >followup, containing a better wording, thanks to Owen comment. >--- > C4/Circulation.pm | 14 +++++++++----- > circ/returns.pl | 3 +++ > .../intranet-tmpl/prog/en/modules/circ/circulation.tt | 4 ++-- > koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt | 4 ++++ > 4 files changed, 18 insertions(+), 7 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index f087924..062b165 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -1946,11 +1946,15 @@ sub AddReturn { > } > # there's no overdue on the item but borrower had been previously debarred > } elsif ( $issue->{date_due} and $borrower->{'debarred'} ) { >- my $borrower_debar_dt = dt_from_string( $borrower->{debarred} ); >- $borrower_debar_dt->truncate(to => 'day'); >- my $today_dt = $today->clone()->truncate(to => 'day'); >- if ( DateTime->compare( $borrower_debar_dt, $today_dt ) != -1 ) { >- $messages->{'PrevDebarred'} = $borrower->{'debarred'}; >+ if ( $borrower->{debarred} eq "9999-12-31") { >+ $messages->{'ForeverDebarred'} = $borrower->{'debarred'}; >+ } else { >+ my $borrower_debar_dt = dt_from_string( $borrower->{debarred} ); >+ $borrower_debar_dt->truncate(to => 'day'); >+ my $today_dt = $today->clone()->truncate(to => 'day'); >+ if ( DateTime->compare( $borrower_debar_dt, $today_dt ) != -1 ) { >+ $messages->{'PrevDebarred'} = $borrower->{'debarred'}; >+ } > } > } > } >diff --git a/circ/returns.pl b/circ/returns.pl >index eeb0fe3..14997a1 100755 >--- a/circ/returns.pl >+++ b/circ/returns.pl >@@ -506,6 +506,9 @@ foreach my $code ( keys %$messages ) { > elsif ( $code eq 'PrevDebarred' ) { > $err{prevdebarred} = $messages->{'PrevDebarred'}; > } >+ elsif ( $code eq 'ForeverDebarred' ) { >+ $err{foreverdebarred} = $messages->{'ForeverDebarred'}; >+ } > elsif ( $code eq 'NotForLoanStatusUpdated' ) { > $err{NotForLoanStatusUpdated} = $messages->{NotForLoanStatusUpdated}; > } >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >index 0872043..b938724 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >@@ -440,7 +440,7 @@ $(document).ready(function() { > [% END %] > > [% IF ( USERBLOCKEDNOENDDATE ) %] >- <li>Patron has a restriction (no expiry date).</li> >+ <li>Patron has an indefinite restriction.</li> > [% END %] > > [% IF ( USERBLOCKEDOVERDUE ) %] >@@ -449,7 +449,7 @@ $(document).ready(function() { > </ul> > > [% IF (forceallow) %] >- <li>Restriction overridden temporarily</li> >+ <li>Restriction overridden temporarily.</li> > [% END %] > > </div></div> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >index 8a12b8b..15f45a1 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >@@ -423,6 +423,10 @@ $(document).ready(function () { > [% IF ( errmsgloo.prevdebarred ) %] > <p class="problem"><b>Reminder: </b>Patron was earlier restricted until [% errmsgloo.prevdebarred | $KohaDates %]</p> > [% END %] >+ [% IF ( errmsgloo.foreverdebarred ) %] >+ <p class="problem"><b>Reminder: </b>Patron has an indefinite restriction</p> >+ [% END %] >+ > [% END %] > [% IF ( soundon ) %] > <audio src="[% interface %]/[% theme %]/sound/critical.ogg" autoplay="autoplay" autobuffer="autobuffer"></audio> >-- >2.1.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 13261
:
33593
|
33594
|
33595
|
33619
|
33630
|
33944