Bug 13657 - Don't show extra comma after guarantor name on patron details
Summary: Don't show extra comma after guarantor name on patron details
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Assignee: Marc Véron
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-02 17:18 UTC by Katrin Fischer
Modified: 2016-01-19 04:37 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 13657 - Don't show extra comma after guarantor name on patron details (1.55 KB, patch)
2015-02-10 12:29 UTC, Thomas Wright
Details | Diff | Splinter Review
Bug 13657 - Don't show extra comma after guarantor name on patron details (1.68 KB, patch)
2015-02-10 15:46 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 13657 - Don't show extra comma after guarantor name on patron details (1.65 KB, patch)
2015-03-02 09:43 UTC, Jesse Maseto
Details | Diff | Splinter Review
[PASSED QA] Bug 13657 - Don't show extra comma after guarantor name on patron details (1.78 KB, patch)
2015-03-05 10:21 UTC, Katrin Fischer
Details | Diff | Splinter Review

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