Bug 13657

Summary: Don't show extra comma after guarantor name on patron details
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: PatronsAssignee: Marc Véron <veron>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low CC: chris, gmcharlt, jonathan.druart, kyle.m.hall, tomascohen, tomsStudy
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 13657 - Don't show extra comma after guarantor name on patron details
Bug 13657 - Don't show extra comma after guarantor name on patron details
Bug 13657 - Don't show extra comma after guarantor name on patron details
[PASSED QA] Bug 13657 - Don't show extra comma after guarantor name on patron details

Description Katrin Fischer 2015-02-02 17:18:52 UTC
If a patron is linked to an organisation, the name of the 'guarantor' is shown on the patron details page in staff. An organisation has no firstname, but the template expects one and adds an extra comma after the name.

Example:
Garantor: Organisation,

To test:

- Create 2 patrons, one each for
  - an organisation type patron category
  - a member of organisation type patron category
- Link both from the 'member patron' edit form
- Note that the guarantor is now shown on the details tab
- Verify there is an extra comma after the organisation's name
Comment 1 Thomas Wright 2015-02-10 12:29:32 UTC Comment hidden (obsolete)
Comment 2 Marc Véron 2015-02-10 15:46:12 UTC Comment hidden (obsolete)
Comment 3 Jesse Maseto 2015-03-02 09:43:59 UTC Comment hidden (obsolete)
Comment 4 Katrin Fischer 2015-03-05 10:21:48 UTC
Created attachment 36548 [details] [review]
[PASSED QA] Bug 13657 - Don't show extra comma after guarantor name on patron details

This patch suppresses the first name part (including comma) if first name is empty. This way, first name is still displays with natural persons, but not with organizations.

To test:
Apply this patch (without the first patch).
Have one patron with a natural person as guarantor and one patron with an organization as guarantor. Verify that both display properly on the patron details page.

Signed-off-by: Jesse Maseto <Jesse@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 5 Tomás Cohen Arazi (tcohen) 2015-03-11 17:41:25 UTC
Patch pushed to master.

Thanks Marc!
Comment 6 Chris Cormack 2015-03-13 22:39:44 UTC
Pushed to 3.18.x will be in 3.18.5