Bugzilla – Attachment 173704 Details for
Bug 38248
Staff interface detail page item table lookup fails when item has lost status but no claims returned
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38248: Do not deal with return claims if pref is not set
Bug-38248-Do-not-deal-with-return-claims-if-pref-i.patch (text/plain), 2.07 KB, created by
Jonathan Druart
on 2024-10-30 08:57:12 UTC
(
hide
)
Description:
Bug 38248: Do not deal with return claims if pref is not set
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2024-10-30 08:57:12 UTC
Size:
2.07 KB
patch
obsolete
>From 0407c54824f49c6753658e79140009a4dc671966 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 30 Oct 2024 09:53:44 +0100 >Subject: [PATCH] Bug 38248: Do not deal with return claims if pref is not set > >If the pref is not set we don't embed return_claims and so >row.return_claims will never be set. >When the pref is on, row.return_claims should always be an array. > >Test plan: >Same as previous patch >--- > .../html_helpers/tables/items/catalogue_detail.inc | 10 ++++++---- > 1 file changed, 6 insertions(+), 4 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc >index 14b47ecf9cd..7e44c02a5a1 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc >@@ -494,11 +494,13 @@ > > if ( row.lost_status ) { > let lost_lib = av_lost.get(row.lost_status.toString()) || _("Unavailable (lost or missing"); >- const hasReturnClaims = row.return_claims && row.return_claims.filter(rc => !rc.resolution).length > 0 ? true : false > nodes += '<span class="lost">%s</span>'.format(escape_str(lost_lib)); >- if(hasReturnClaims) { >- nodes += '<span class="claimed_returned">' + _("(Claimed returned)") + '</span>'; >- } >+ [% IF Koha.Preference('ClaimReturnedLostValue') %] >+ const hasReturnClaims = row.return_claims.filter(rc => !rc.resolution).length > 0 ? true : false >+ if(hasReturnClaims) { >+ nodes += '<span class="claimed_returned">' + _("(Claimed returned)") + '</span>'; >+ } >+ [% END %] > } > > if ( row.withdrawn ) { >-- >2.34.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 38248
:
173241
|
173250
|
173704
|
173708