Bugzilla – Attachment 168679 Details for
Bug 25733
Return claims attention can't be cleared
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25733: Add warning for unresolved claims
Bug-25733-Add-warning-for-unresolved-claims.patch (text/plain), 3.60 KB, created by
Sam Lau
on 2024-07-09 18:29:21 UTC
(
hide
)
Description:
Bug 25733: Add warning for unresolved claims
Filename:
MIME Type:
Creator:
Sam Lau
Created:
2024-07-09 18:29:21 UTC
Size:
3.60 KB
patch
obsolete
>From 6992687eaaae532c16bce5f967f79a8fc15a4c72 Mon Sep 17 00:00:00 2001 >From: Sam Lau <samalau@gmail.com> >Date: Tue, 9 Jul 2024 17:27:57 +0000 >Subject: [PATCH] Bug 25733: Add warning for unresolved claims > >--- > Koha/Patron.pm | 16 ++++++++++++++++ > .../prog/en/includes/patron_messages.inc | 17 ++++++++++++++++- > 2 files changed, 32 insertions(+), 1 deletion(-) > >diff --git a/Koha/Patron.pm b/Koha/Patron.pm >index 1691c9d25b..861306bffb 100644 >--- a/Koha/Patron.pm >+++ b/Koha/Patron.pm >@@ -1627,6 +1627,22 @@ sub return_claims { > return Koha::Checkouts::ReturnClaims->_new_from_dbic( $return_claims ); > } > >+=head3 unresolved_return_claims >+ >+ my $unresolved_return_claims = $patron->unresolved_return_claims; >+ >+Returns all unresolved return claims associated with this patron. >+ >+=cut >+ >+sub unresolved_return_claims { >+ my ($self) = @_; >+ my $unresolved_return_claims = $self->_result->return_claims_borrowernumbers->search( >+ { resolution => undef }, >+ ); >+ return Koha::Checkouts::ReturnClaims->_new_from_dbic($unresolved_return_claims); >+} >+ > =head3 notice_email_address > > my $email = $patron->notice_email_address; >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 666d07ad0f..27d45e856e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc >@@ -2,10 +2,13 @@ > [% USE Branches %] > [% USE Categories %] > [% SET ClaimReturnedWarningThreshold = Koha.Preference('ClaimReturnedWarningThreshold') %] >+[% SET UnresolvedClaimReturnedWarningThreshold = Koha.Preference('UnresolvedClaimReturnedWarningThreshold') %] >+ > [% SET return_claims = patron.return_claims %] >+[% SET unresolved_return_claims = patron.unresolved_return_claims %] > [% SET logged_in_branchcode = Branches.GetLoggedInBranchcode() %] > >-[% IF ( has_modifications || warndeparture || returnbeforeexpiry || expired || patron.gonenoaddress || patron.lost || userdebarred || odues || ( return_claims.count > ClaimReturnedWarningThreshold ) || age_limitations || limited_category || charges || charges_guarantors_guarantees || charges_guarantees || credits ) %] >+[% IF ( has_modifications || warndeparture || returnbeforeexpiry || expired || patron.gonenoaddress || patron.lost || userdebarred || odues || ( return_claims.count > ClaimReturnedWarningThreshold ) || ( unresolved_return_claims.count > UnresolvedClaimReturnedWarningThreshold ) || age_limitations || limited_category || charges || charges_guarantors_guarantees || charges_guarantees || credits ) %] > <h3>Attention</h3> > <ul> > [% IF ( has_modifications ) %] >@@ -103,6 +106,18 @@ > </li> > [% END %] > >+ [% IF unresolved_return_claims.count > UnresolvedClaimReturnedWarningThreshold %] >+ [% IF unresolved_return_claims.count > 1 %] >+ <li class="return_claims blocker"> >+ <span class="circ-hlt return-claims">Unresolved return claims:</span> Patron has [% unresolved_return_claims.count | html %] unresolved RETURN CLAIMS >+ </li> >+ [% ELSE %] >+ <li class="return_claims blocker"> >+ <span class="circ-hlt return-claims">Unresolved return claims:</span> Patron has [% unresolved_return_claims.count | html %] unresolved RETURN CLAIM >+ </li> >+ [% END %] >+ [% END %] >+ > [% IF age_limitations %] > <li class="invalid_age"> > <span class="circ-hlt">Patron's age is incorrect for their category.</span> >-- >2.39.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 25733
:
168678
|
168679
|
168680
|
168681
|
168759