Bugzilla – Attachment 92608 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.59 KB, created by
Nick Clemens (kidclamp)
on 2019-09-05 13:56:55 UTC
(
hide
)
Description:
Bug 21406: [18.11.x only] Prevent errors from undefined fields in requests
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2019-09-05 13:56:55 UTC
Size:
1.59 KB
patch
obsolete
>From ec565aafb93105d52c488579edd32163b0935fa3 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 >--- > koha-tmpl/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 5173a18c47..33c97b865e 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.11.0
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