From 8bf9d17a3807aa0fd2ac408fc9bdcc1d9bda21be Mon Sep 17 00:00:00 2001 From: Magnus Enger Date: Tue, 16 Oct 2018 21:25:43 +0200 Subject: [PATCH] Bug 21585: Ignore missing firstname in ILL requests table To test: - Make sure you have a patron with just a surname and no firstname - Create an ILL request so that the name of this patron shows up in the Patron column of the ILL requests table - Before the patch, the name will display as "null Surname" - Apply the patch - Reload the ILL requests page - The name should now display as just "Surname" - Sign ye merrily off Signed-off-by: Andrew Isherwood Signed-off-by: Josef Moravec Signed-off-by: Nick Clemens (cherry picked from commit 5ea877f6cba299373e0ebb9c59f8797baba98bec) Signed-off-by: Martin Renvoize (cherry picked from commit da971a81da893ca625d78b172ccab8f4131a8664) Signed-off-by: Fridolin Somers --- .../intranet-tmpl/prog/en/modules/ill/ill-requests.tt | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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 e7e0372b58..3799419e96 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 @@ -107,11 +107,14 @@ // Our 'render' function for borrowerlink var createPatronLink = function(data, type, row) { - return '' + - row.patron_firstname + ' ' + row.patron_surname + - ''; + 'borrowernumber='+row.borrowernumber+'">'; + if ( row.patron_firstname ) { + patronLink = patronLink + row.patron_firstname + ' '; + } + patronLink = patronLink + row.patron_surname + ''; + return patronLink }; // Our 'render' function for the library name -- 2.39.5