Bugzilla – Attachment 137025 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.06 KB, created by
Kyle M Hall (khall)
on 2022-07-01 15:24:51 UTC
(
hide
)
Description:
Bug 31087: Prevent stringification of null in return claims
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2022-07-01 15:24:51 UTC
Size:
2.06 KB
patch
obsolete
>From 6d9a86191796a4b8fbd7983e8f06cac5555db5c0 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> > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > 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 471ec6bc680..965aec6cf03 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.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 31087
:
136977
| 137025