Bug 7198 - overdue report does not display patron name if firstname and/or surname are null
Summary: overdue report does not display patron name if firstname and/or surname are null
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: 3.6
Hardware: All All
: PATCH-Sent (DO NOT USE) normal (vote)
Assignee: Galen Charlton
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on: 6585
Blocks:
  Show dependency treegraph
 
Reported: 2011-11-09 01:29 UTC by Galen Charlton
Modified: 2013-12-05 19:57 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Text to go in the release notes:
Version(s) released in:


Attachments
proposed bugfix (102 bytes, text/plain)
2011-11-09 02:11 UTC, Galen Charlton
Details
proposed bugfix (deleted)
2011-11-09 02:13 UTC, Galen Charlton
Details
proposed fix (4.27 KB, patch)
2011-11-11 20:15 UTC, Galen Charlton
Details | Diff | Splinter Review
bug 7198: show patron name in overdue list even if name column is null (4.32 KB, patch)
2011-11-12 06:37 UTC, Chris Cormack
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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.