Bug 25046: Include borrowers.othernames in SELECT statement
authorAndreas Roussos <a.roussos@dataly.gr>
Thu, 2 Apr 2020 17:14:57 +0000 (19:14 +0200)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Wed, 8 Apr 2020 10:51:34 +0000 (11:51 +0100)
commit77457a496a43d9d3bd0330d2ed511b0d1388d8b0
tree279153fb2af56062c46d5c084b47d368d318369a
parentc88c8e5322d1205ca4e39409b34f8d02311182ad
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 <nazli@devinim.com.tr>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
C4/Utils/DataTables/Members.pm