From fd531c242b7a74725a0bf21cf541a012470789ac Mon Sep 17 00:00:00 2001 From: Andreas Roussos Date: Thu, 2 Apr 2020 19:14:57 +0200 Subject: [PATCH] Bug 25046: Include borrowers.othernames in SELECT statement In C4/Utils/DataTables/Members.pm, the SELECT statement that fetches patron data from the database does not include borrowers.othernames in the field list. As a consequence, when the output is in the form of a DataTable, the Template Toolkit files that refer to .othernames (such as the patron-title.inc include) won't display the information from the 'Other name' input field if that field has been filled in. This patch fixes that. Test plan: 0) Have a few patrons with some data in the 'Other name' field. 1) Perform a generic search in Home > Patrons to ensure you will get a DataTable with results. 2) Observe that the 'Name' column does not include 'Other name' info. 3) Apply the patch, and restart Plack if necessary. 4) Repeat your search: this time you should see the information from the 'Other name' field, it will be next to the patron's First name and within parentheses. Sponsored-by: Eugenides Foundation Library Signed-off-by: Devinim Signed-off-by: Jonathan Druart Signed-off-by: Martin Renvoize Signed-off-by: Joy Nelson (cherry picked from commit 5b10df8bf77c8e7148caf042221d2ecd946742fa) Signed-off-by: Lucas Gass --- C4/Utils/DataTables/Members.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/C4/Utils/DataTables/Members.pm b/C4/Utils/DataTables/Members.pm index 88185a04a4..629b3e3917 100644 --- a/C4/Utils/DataTables/Members.pm +++ b/C4/Utils/DataTables/Members.pm @@ -78,6 +78,7 @@ sub search { my $select = "SELECT borrowers.borrowernumber, borrowers.surname, borrowers.firstname, + borrowers.othernames, borrowers.flags, borrowers.streetnumber, borrowers.streettype, borrowers.address, borrowers.address2, borrowers.city, borrowers.state, borrowers.zipcode, -- 2.39.5