Bugzilla – Attachment 136977 Details for
Bug 31087
Undefined notes in returns claims get stringified to 'null'
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31087: Prevent stringification of null in return claims
Bug-31087-Prevent-stringification-of-null-in-retur.patch (text/plain), 2.00 KB, created by
Martin Renvoize (ashimema)
on 2022-07-01 14:45:27 UTC
(
hide
)
Description:
Bug 31087: Prevent stringification of null in return claims
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2022-07-01 14:45:27 UTC
Size:
2.00 KB
patch
obsolete
>From 6055e513677ac0448582b60cdaf19bfcbaaadd96 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Mon, 27 Jun 2022 17:20:55 +0100 >Subject: [PATCH] Bug 31087: Prevent stringification of null in return claims > >The return claims table was stringifying 'null'. This patch updates the >code to check for definition so we don't stringify incorrectly > >Note: This patch was split out from a follow-up on bug 28854 as we felt >it should be treated separately for backportability. > >Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> >--- > koha-tmpl/intranet-tmpl/prog/js/checkouts.js | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >index 471ec6bc68..965aec6cf0 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >@@ -1010,8 +1010,13 @@ $(document).ready(function() { > { > "sClass": "return-claim-notes-td", > "mDataProp": function ( oObj ) { >- return '<span id="return-claim-notes-static-' + oObj.id + '" class="return-claim-notes" data-return-claim-id="' + oObj.id + '">' + oObj.notes + '</span>' >- + '<i style="float:right" class="fa fa-pencil-square-o" title="' + __("Double click to edit") + '"></i>'; >+ let notes = '<span id="return-claim-notes-static-' + oObj.id + '" class="return-claim-notes" data-return-claim-id="' + oObj.id + '">'; >+ if ( oObj.notes ) { >+ notes += oObj.notes; >+ } >+ notes += '</span>'; >+ notes += '<i style="float:right" class="fa fa-pencil-square-o" title="' + __("Double click to edit") + '"></i>'; >+ return notes; > } > }, > { >-- >2.20.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 31087
:
136977
|
137025