Bugzilla – Attachment 94824 Details for
Bug 21406
Not adding author to request can cause JS errors
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21406: [18.11.x only] Prevent errors from undefined fields in requests
Bug-21406-1811x-only-Prevent-errors-from-undefined.patch (text/plain), 1.65 KB, created by
Martin Renvoize (ashimema)
on 2019-10-29 11:14:07 UTC
(
hide
)
Description:
Bug 21406: [18.11.x only] Prevent errors from undefined fields in requests
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2019-10-29 11:14:07 UTC
Size:
1.65 KB
patch
obsolete
>From 56f9795e03474b1e5c848cf37b2bd191e67b1566 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Thu, 5 Sep 2019 13:53:50 +0000 >Subject: [PATCH] Bug 21406: [18.11.x only] Prevent errors from undefined > fields in requests > >To test: >1 - In 18.11 enable ILL and install the freeform backend >2 - Create a request for 'Journal article' >3 - Note there is no 'Author' field >4 - Try to view ILL requests >5 - You get a datatables error about missing metadata_author column >6 - Apply patch >7 - No more error > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > .../intranet-tmpl/prog/en/modules/ill/ill-requests.tt | 10 ++++++++++ > 1 file changed, 10 insertions(+) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt >index 2c307445e6..b8b5fe1d56 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt >@@ -262,6 +262,16 @@ > expandExpand(row); > }); > >+ //Not all types have all core columns, mark them 'N/A' if not applied >+ //Otherwise we get errors on table load >+ dataCopy.forEach(function(thisRow){ >+ core.forEach(function(thisCore){ >+ if ( typeof thisRow[thisCore] == 'undefined' ){ >+ thisRow[thisCore] = 'N/A'; >+ } >+ }); >+ }); >+ > // Assemble an array of column definitions for passing > // to datatables > var colData = []; >-- >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 21406
:
92608
| 94824