Bug 15542

Summary: Patron's information are not always displayed the same way
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: TemplatesAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: aleisha, brendan, julian.maurice, veron
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Medium patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 4041    
Bug Blocks:    
Attachments: Bug 15542: Always display the patron's info the same way.
Bug 15542: Change for the German style address format
Bug 15542: Change for the German style address format
Bug 15542: Always display the patron's info the same way.
Bug 15542: Change for the German style address format
Bug 15542: Always display the patron's info the same way.
Bug 15542: Change for the German style address format
Bug 15542: Always display the patron's info the same way.
Bug 15542: Change for the German style address format
Bug 15542: Always display the patron's info the same way.
Bug 15542: Change for the German style address format
Bug 15542 [QA Followup] - Fix code error
Bug 15542 [QA Followup] - Tidy member-password.pl
Bug 15542 [QA Followup] - Tidy member-password.pl

Description Jonathan Druart 2016-01-11 09:24:38 UTC
The patron's information displayed in the member module (includes/circ-menu.inc and includes/member-display-address-style-*.inc) are not always displayed the same way.
Sometimes the streetnumber is missing, sometimes it's the streettype.
Sometimes the streettype is after the address, sometimes before...
Comment 1 Jonathan Druart 2016-01-11 09:29:30 UTC Comment hidden (obsolete)
Comment 2 Jonathan Druart 2016-01-11 09:29:52 UTC
*** Bug 14481 has been marked as a duplicate of this bug. ***
Comment 3 Marc Véron 2016-01-11 10:20:15 UTC
This patch changes koha-tmpl/intranet-tmpl/prog/en/includes/member-display-address-style-us.inc 

Is there also a need to change koha-tmpl/intranet-tmpl/prog/en/includes/member-display-address-style-de.inc ? (See syspref AddressFormat)
Comment 4 Jonathan Druart 2016-01-11 10:41:29 UTC Comment hidden (obsolete)
Comment 5 Jonathan Druart 2016-01-11 10:41:52 UTC
(In reply to Marc Véron from comment #3)
> This patch changes
> koha-tmpl/intranet-tmpl/prog/en/includes/member-display-address-style-us.inc 
> 
> Is there also a need to change
> koha-tmpl/intranet-tmpl/prog/en/includes/member-display-address-style-de.inc
> ? (See syspref AddressFormat)

Yes of course, done in the second patch.
Comment 6 Marc Véron 2016-01-11 14:27:21 UTC
Sorry, with the syspref 'AddressFormat' set to German, I get:

Template process failed: file error - parse error - member-display-address-style-de.inc line 7: unexpected token (roadtype_desc)
  [% if roadtype_desc %] at /usr/share/kohaclone/C4/Templates.pm line 121.

Seems to be due to a missing blank: [%if roadtype_desc %]

Makes it fail QA tools as well.

BTW: In both the us and the de includes, the if statements are sometimes in capital letters ( [% IF  )and sometimes not ( [% if  ). Should / could that be streamlined?
Comment 7 Jonathan Druart 2016-01-11 15:02:27 UTC Comment hidden (obsolete)
Comment 8 Jonathan Druart 2016-01-11 15:02:56 UTC
The missing space already existed, but there were parenthesis.
Comment 9 Marc Véron 2016-01-11 16:24:37 UTC
On tab "Files" I get

Software error:
Global symbol "$address" requires explicit package name at /usr/share/kohaclone/members/files.pl line 126.
Global symbol "$roadtype" requires explicit package name at /usr/share/kohaclone/members/files.pl line 127.
Execution of /usr/share/kohaclone/members/files.pl aborted due to compilation errors.
Comment 10 Jonathan Druart 2016-01-11 16:43:32 UTC Comment hidden (obsolete)
Comment 11 Jonathan Druart 2016-01-11 16:43:55 UTC Comment hidden (obsolete)
Comment 12 Jonathan Druart 2016-01-11 16:44:48 UTC
Sorry about that Marc, this tab was not displayed on the install I have tested.
Comment 13 Jonathan Druart 2016-01-11 16:48:47 UTC Comment hidden (obsolete)
Comment 14 Jonathan Druart 2016-01-11 16:48:50 UTC Comment hidden (obsolete)
Comment 15 Marc Véron 2016-01-11 16:54:17 UTC Comment hidden (obsolete)
Comment 16 Marc Véron 2016-01-11 16:55:14 UTC Comment hidden (obsolete)
Comment 17 Aleisha Amohia 2016-01-11 21:13:31 UTC
Thank you for this patch!!
Comment 18 Kyle M Hall 2016-01-15 17:42:44 UTC
Created attachment 46717 [details] [review]
Bug 15542: Always display the patron's info the same way.

The patron's information displayed in the member module
(includes/circ-menu.inc and includes/member-display-address-style-*.inc)
are not always displayed the same way.
Sometimes the streetnumber is missing, sometimes it's the streettype.
Sometimes the streettype is after the address, sometimes before...

Test plan:
Go on a patron detail page, and open all the tabs on the left (Check
out, Fines, Notices, etc.)
Without this patch, the patron's info displayed will differ from one page to
another.
With this patch, they will be displayed the same everywhere.

Followed test plan, works as expected. (Tested both patches together.)
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 19 Kyle M Hall 2016-01-15 17:42:51 UTC
Created attachment 46718 [details] [review]
Bug 15542: Change for the German style address format

Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 20 Kyle M Hall 2016-01-15 17:42:53 UTC
Created attachment 46719 [details] [review]
Bug 15542 [QA Followup] - Fix code error

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 21 Kyle M Hall 2016-01-15 17:42:56 UTC Comment hidden (obsolete)
Comment 22 Kyle M Hall 2016-01-15 17:44:10 UTC
Created attachment 46721 [details] [review]
Bug 15542 [QA Followup] - Tidy member-password.pl

No other patches in process modify member-password.pl, now would be
a great time to tidy it!

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 23 Brendan Gallagher 2016-01-23 19:29:58 UTC
Pushed to Master - Should be in the May 2016 Release.  Thanks!
Comment 24 Julian Maurice 2016-01-25 12:05:03 UTC
Patches pushed to 3.22.x, will be in 3.22.2
Comment 25 Jonathan Druart 2016-02-04 16:10:40 UTC
(In reply to Kyle M Hall from comment #22)
> No other patches in process modify member-password.pl, now would be
> a great time to tidy it!

Yes, bug 15407 was there.