Bug 15699 - Opac: Course reserves instructors should be in form "Surname, Firstname" for sorting purposes
Summary: Opac: Course reserves instructors should be in form "Surname, Firstname" for ...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Course reserves (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Assignee: Nick Clemens
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 22949
  Show dependency treegraph
 
Reported: 2016-01-28 21:58 UTC by Nick Clemens
Modified: 2019-06-24 19:57 UTC (History)
8 users (show)

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


Attachments
Bug 15699 - Course reserves instructors should be in form "Surname, Firstname" for sorting purposes (1.81 KB, patch)
2016-01-28 22:06 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 15699 - Course reserves instructors should be in form "Surname, Firstname" for sorting purposes (2.13 KB, patch)
2016-01-29 07:03 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 15699 [QA followup] - Only display firstname if present (1.49 KB, patch)
2016-02-01 16:06 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 15699 - Course reserves instructors should be in form "Surname, Firstname" for sorting purposes (2.20 KB, patch)
2016-02-02 10:51 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 15699 [QA followup] - Only display firstname if present (1.56 KB, patch)
2016-02-02 10:51 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens 2016-01-28 21:58:26 UTC

    
Comment 1 Nick Clemens 2016-01-28 22:06:28 UTC Comment hidden (obsolete)
Comment 2 Marc Véron 2016-01-29 07:03:49 UTC Comment hidden (obsolete)
Comment 3 Jonathan Druart 2016-01-29 11:17:26 UTC
"firstname, surname" is the form we usually use to display a patron name.
I am not sure about this change, ccing Owen and Katrin to get some feedbacks.
Comment 4 Katrin Fischer 2016-01-29 12:14:50 UTC
Hm, not sure if I am confused, but

firstname surname
or 
surname, firstname

For sorting and in general I prefer definitely the latter :)

Ideally the code should check for the existance of firstname, as we also have organisations where this field will remain empty (not displayed in the patron form even). 

So I'd say something like:

surname[if firstname], firstname[end]
Comment 5 Marc Véron 2016-01-29 13:00:11 UTC
(In reply to Katrin Fischer from comment #4)

(...)
> Ideally the code should check for the existance of firstname, as we also
> have organisations where this field will remain empty (not displayed in the
> patron form even). 
> 
> So I'd say something like:
> 
> surname[if firstname], firstname[end]

Katrin, I missed that while signing off because it is about instructors / teachers who normally schould have first names :-) 
...but you are right, it makes sense to display the firstname only if there is a first name.
Comment 6 Katrin Fischer 2016-01-29 13:02:23 UTC
Maybe a faculty or work group account? (quote 123 :) )
Comment 7 Marc Véron 2016-01-29 13:26:48 UTC
(In reply to Katrin Fischer from comment #6)
> Maybe a faculty or work group account? (quote 123 :) )

Or even kind of room reservation...
Comment 8 Katrin Fischer 2016-01-29 13:43:20 UTC
Libraries... who knows :) Not a blocker.
Comment 9 Jonathan Druart 2016-02-01 12:17:45 UTC
ping Nick?
Comment 10 Nick Clemens 2016-02-01 16:06:04 UTC Comment hidden (obsolete)
Comment 11 Jonathan Druart 2016-02-02 10:51:05 UTC
Created attachment 47545 [details] [review]
Bug 15699 - Course reserves instructors should be in form "Surname, Firstname" for sorting purposes

This patch changes the order of the name fields and adds a span class around
each in case of library wanting to customize further

To test:
1 - Enable course reserves
2 - Add some courses with instrcutors
3 - Note they are of form "Firstname Surname"
4 - Apply patch
5 - Note the change
6 - Note span tags
7 - Note you can hide firstname by adding to intranet user js: $(".instr_firstname, instr_separator").hide();

Sing-off note: This patch displays the names as advertised on cgi-bin/koha/opac-course-reserves.pl Sorting
the names would need some more actions but seems not to be intended by this patch.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 12 Jonathan Druart 2016-02-02 10:51:11 UTC
Created attachment 47546 [details] [review]
Bug 15699 [QA followup] - Only display firstname if present

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 13 Brendan Gallagher 2016-02-24 02:12:21 UTC
Pushed to Master - Should be in the May 2016 Release.  Thanks
Comment 14 Julian Maurice 2016-03-07 11:01:49 UTC
Patches pushed to 3.22.x, will be in 3.22.5
Comment 15 Frédéric Demians 2016-03-15 09:00:41 UTC
This patch has been pushed to 3.20.x, will be in 3.20.10.