Bugzilla – Attachment 182487 Details for
Bug 33430
Use REST API for suggestions tables
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33430: (follow-up) Handle undefined data in column renders
Bug-33430-follow-up-Handle-undefined-data-in-colum.patch (text/plain), 4.54 KB, created by
Fridolin Somers
on 2025-05-15 09:06:15 UTC
(
hide
)
Description:
Bug 33430: (follow-up) Handle undefined data in column renders
Filename:
MIME Type:
Creator:
Fridolin Somers
Created:
2025-05-15 09:06:15 UTC
Size:
4.54 KB
patch
obsolete
>From 7f5f57f1b6ddae5fc6352aabf839f067b30e3bde Mon Sep 17 00:00:00 2001 >From: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> >Date: Thu, 15 May 2025 09:53:47 +0100 >Subject: [PATCH] Bug 33430: (follow-up) Handle undefined data in column > renders > >Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> >--- > .../prog/en/modules/suggestion/suggestion.tt | 26 ++++++++++++------- > 1 file changed, 16 insertions(+), 10 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt >index 2762234f09..3637c8dee9 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt >@@ -1411,10 +1411,13 @@ > searchable: true, > orderable: true, > render: function (data, type, row, meta) { >- let node = '<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=%s">%s'.format(row.manager.patron_id, row.manager.surname); >- if(row.manager.firstname) node += ', %s'.format(row.manager.firstname); >- node += '</a>'; >- return node; >+ if(row?.manager) { >+ let node = '<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=%s">%s'.format(row.manager?.patron_id, row.manager?.surname); >+ if(row.manager?.firstname) node += ', %s'.format(row.manager?.firstname); >+ node += '</a>'; >+ return node; >+ } >+ return '' > }, > }, > { >@@ -1430,10 +1433,13 @@ > searchable: true, > orderable: true, > render: function (data, type, row, meta) { >- let node = '<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=%s">%s'.format(row.last_modifier.patron_id, row.last_modifier.surname); >- if(row.last_modifier.firstname) node += ', %s'.format(row.last_modifier.firstname); >- node += '</a>'; >- return node; >+ if(row.last_modifier) { >+ let node = '<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=%s">%s'.format(row.last_modifier?.patron_id, row.last_modifier?.surname); >+ if(row.last_modifier?.firstname) node += ', %s'.format(row.last_modifier?.firstname); >+ node += '</a>'; >+ return node; >+ } >+ return '' > }, > }, > { >@@ -1457,7 +1463,7 @@ > searchable: false, > orderable: true, > render: function (data, type, row, meta) { >- return escape_str(row.library.name ? row.library.name : ''); >+ return escape_str(row.library?.name ? row.library.name : ''); > }, > }, > { >@@ -1465,7 +1471,7 @@ > searchable: false, > orderable: true, > render: function (data, type, row, meta) { >- return escape_str(row.fund ? row.fund.name : ''); >+ return escape_str(row.fund?.name ? row.fund.name : ''); > }, > }, > { >-- >2.43.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 33430
:
182146
|
182147
|
182148
|
182149
|
182150
|
182161
|
182196
|
182197
|
182198
|
182199
|
182200
|
182202
|
182203
|
182204
|
182205
|
182206
|
182207
|
182208
|
182209
|
182210
|
182211
|
182339
|
182340
|
182341
|
182342
|
182343
|
182428
|
182429
|
182430
|
182431
|
182432
|
182433
|
182434
|
182478
|
182480
|
182481
|
182482
|
182483
|
182484
|
182485
|
182486
|
182487
|
182493
|
182494
|
182495
|
182496
|
182497
|
182498
|
182499
|
182500
|
182577
|
182578