Bug 25046

Summary: C4::Utils::DataTables::Members does not SELECT othernames from borrowers table
Product: Koha Reporter: Andreas Roussos <a.roussos>
Component: PatronsAssignee: Andreas Roussos <a.roussos>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low CC: 1joynelson, gmcharlt, kohadevinim, kyle.m.hall, lucas
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
20.05.00, 19.11.06, 19.05.11
Attachments: Bug 25046: Include borrowers.othernames in SELECT statement
Bug 25046: Include borrowers.othernames in SELECT statement
Bug 25046: Include borrowers.othernames in SELECT statement
Bug 25046: Add test

Description Andreas Roussos 2020-04-02 17:09:39 UTC
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.
Comment 1 Andreas Roussos 2020-04-02 18:42:06 UTC
Created attachment 102304 [details] [review]
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
Comment 2 Devinim 2020-04-06 19:50:43 UTC
Created attachment 102467 [details] [review]
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>
Comment 3 Jonathan Druart 2020-04-08 09:29:00 UTC
Created attachment 102539 [details] [review]
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>
Comment 4 Jonathan Druart 2020-04-08 09:29:04 UTC
Created attachment 102540 [details] [review]
Bug 25046: Add test

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 5 Martin Renvoize 2020-04-08 10:55:41 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 6 Joy Nelson 2020-05-01 18:58:30 UTC
backported to 19.11.x for 19.11.06
Comment 7 Lucas Gass 2020-05-11 22:03:53 UTC
backported to 19.05.x for 19.05.10