Bug 16847 - Remove C4::Members::GetTitles
Summary: Remove C4::Members::GetTitles
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 16846
  Show dependency treegraph
 
Reported: 2016-07-04 14:18 UTC by Jonathan Druart
Modified: 2017-12-07 22:17 UTC (History)
5 users (show)

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


Attachments
Bug 16847: Remove C4::Members::GetTitles (6.32 KB, patch)
2016-07-04 14:21 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 16847: Add empty option to Salutation/title (1.29 KB, patch)
2016-07-04 14:21 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 16847: Remove C4::Members::GetTitles (6.45 KB, patch)
2016-07-04 15:52 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 16847: Add empty option to Salutation/title (1.29 KB, patch)
2016-07-04 15:52 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 16847: Remove C4::Members::GetTitles (6.64 KB, patch)
2016-07-04 15:58 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 16847: Add empty option to Salutation/title (1.43 KB, patch)
2016-07-04 15:59 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 16847: Remove C4::Members::GetTitles (6.69 KB, patch)
2016-07-20 14:54 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 16847: Add empty option to Salutation/title (1.48 KB, patch)
2016-07-20 14:54 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2016-07-04 14:18:08 UTC
This subroutine just reads the content of a pref, split it, add an empty string and returns.
It is not really useful and the code in the script (memberentry.pl) uses the only occurrence of CGI::popup_menu
Let's remove it and build the dropdown list in the template.
Comment 1 Jonathan Druart 2016-07-04 14:21:38 UTC Comment hidden (obsolete)
Comment 2 Jonathan Druart 2016-07-04 14:21:41 UTC Comment hidden (obsolete)
Comment 3 Marc Véron 2016-07-04 14:51:12 UTC
Hi Jonathan.

After applying the patches, I get still results for git grep GetTitles:

C4/Members.pm:        &GetTitles
Comment 4 Jonathan Druart 2016-07-04 15:52:29 UTC Comment hidden (obsolete)
Comment 5 Jonathan Druart 2016-07-04 15:52:32 UTC Comment hidden (obsolete)
Comment 6 Jonathan Druart 2016-07-04 15:52:50 UTC
(In reply to Marc Véron from comment #3)
> Hi Jonathan.
> 
> After applying the patches, I get still results for git grep GetTitles:
> 
> C4/Members.pm:        &GetTitles

Fixed!
Thanks for testing Marc!
Comment 7 Marc Véron 2016-07-04 15:58:25 UTC Comment hidden (obsolete)
Comment 8 Marc Véron 2016-07-04 15:59:57 UTC Comment hidden (obsolete)
Comment 9 Marcel de Rooy 2016-07-15 09:52:00 UTC
While trying to qa this report, I had a long struggle with report 16591.
opac-memberentry hangs on random seed generation (CSRF token)
Comment 10 Tomás Cohen Arazi 2016-07-20 14:54:51 UTC
Created attachment 53527 [details] [review]
Bug 16847: Remove C4::Members::GetTitles

This subroutine just reads the content of a pref, split it, add an
empty string and returns.
It is not really useful and the code in the script (memberentry.pl) uses
the only occurrence of CGI::popup_menu
Let's remove it and build the dropdown list in the template.

Test plan:
1/ Empty BorrowersTitles, edit a patron and confirm that the "Salutation"
does not appear
2/ Fill BorrowersTitles with "Mr|Mrs|Miss|Ms", edit a patron and confirm
that the "Salutation" dropdown list is correctly filled.
The default option should be selected if you are editing a patron with a
title defined.
This should also be tested at the OPAC.

Followed test pan, works as expected in Staff and OPAC
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 11 Tomás Cohen Arazi 2016-07-20 14:54:56 UTC
Created attachment 53528 [details] [review]
Bug 16847: Add empty option to Salutation/title

At the OPAC there is no way to empty this value.
I think it should be allowed to empty it.

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 12 Kyle M Hall 2016-07-22 17:23:51 UTC
Pushed to master for 16.11, thanks Jonathan!
Comment 13 Frédéric Demians 2016-08-01 13:45:54 UTC
Pushed in 16.05. Will be in 16.05.02.