Bug 16847

Summary: Remove C4::Members::GetTitles
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: Architecture, internals, and plumbingAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: f.demians, kyle, m.de.rooy, tomascohen, veron
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on:    
Bug Blocks: 16846    
Attachments: Bug 16847: Remove C4::Members::GetTitles
Bug 16847: Add empty option to Salutation/title
Bug 16847: Remove C4::Members::GetTitles
Bug 16847: Add empty option to Salutation/title
Bug 16847: Remove C4::Members::GetTitles
Bug 16847: Add empty option to Salutation/title
Bug 16847: Remove C4::Members::GetTitles
Bug 16847: Add empty option to Salutation/title

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.