Bug 7198

Summary: overdue report does not display patron name if firstname and/or surname are null
Product: Koha Reporter: Galen Charlton <gmcharlt>
Component: CirculationAssignee: Galen Charlton <gmcharlt>
Status: CLOSED FIXED QA Contact: Marcel de Rooy <m.de.rooy>
Severity: normal    
Priority: PATCH-Sent (DO NOT USE) CC: chris, gmcharlt, m.de.rooy, paul.poulain
Version: 3.6   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 6585    
Bug Blocks:    
Attachments: proposed bugfix
proposed bugfix
proposed fix
bug 7198: show patron name in overdue list even if name column is null

Description Galen Charlton 2011-11-09 01:29:50 UTC
The overdue report (circ/overdue.pl) fails to display the patron name if the surname and/or firstname are null.  This is because the concat() function in MySQL (properly) returns NULL if any of its arguments are NULL.

Instead of using concat(), the individual name components should be returned, allowing the template to format the patron name however desired.
Comment 1 Galen Charlton 2011-11-09 02:11:48 UTC Comment hidden (obsolete)
Comment 2 Galen Charlton 2011-11-09 02:13:29 UTC Comment hidden (obsolete)
Comment 3 Chris Cormack 2011-11-10 08:11:46 UTC
Hmm something odd with the patch attached here
Comment 4 Galen Charlton 2011-11-11 20:15:32 UTC Comment hidden (obsolete)
Comment 5 Galen Charlton 2011-11-11 20:16:13 UTC
The content of attachment 6261 [details] has been deleted by
    Galen Charlton <gmcharlt@gmail.com>
who provided the following reason:

wrong attachment

The token used to delete this attachment was generated at 2011-11-11 20:16:03 UTC.
Comment 6 Galen Charlton 2011-11-11 20:16:32 UTC
Corrected version attached.
Comment 7 Chris Cormack 2011-11-12 06:37:06 UTC
Created attachment 6300 [details] [review]
bug 7198: show patron name in overdue list even if name column is null

If the surname or firstname of a patron is NULL, the MySQL concat()
function (properly) returns NULL, leading to the patron name not
displaying in the overdue report.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Comment 8 Marcel de Rooy 2011-12-12 14:26:25 UTC
QA: Looks good. Updating patch status.
Comment 9 Paul Poulain 2011-12-12 15:36:33 UTC
Patch pushed, please test
Comment 10 Jared Camins-Esakov 2012-05-23 12:07:16 UTC
Included in 3.6 prior to 3.6.5.