Bug 10760 - Use Street Number and Street type in Alternate Address section
Summary: Use Street Number and Street type in Alternate Address section
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Marc Véron
QA Contact: Testopia
URL:
Keywords:
: 13996 (view as bug list)
Depends on:
Blocks: 17559
  Show dependency treegraph
 
Reported: 2013-08-19 12:05 UTC by Victor Pang
Modified: 2017-06-14 22:13 UTC (History)
8 users (show)

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


Attachments
Bug 10760: Alternate Address: Make street number and street type editable (5.00 KB, patch)
2016-06-14 08:33 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 10760: Alternate Address: Display street number and street type (4.75 KB, patch)
2016-06-14 09:07 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 10760: (followup) Move street type after address (1.35 KB, patch)
2016-06-20 14:19 UTC, Marc Véron
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 10760: Alternate Address: Make street number and street type editable (5.10 KB, patch)
2016-06-20 14:52 UTC, Owen Leonard
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 10760: Alternate Address: Display street number and street type (4.85 KB, patch)
2016-06-20 14:52 UTC, Owen Leonard
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 10760: (followup) Move street type after address (1.45 KB, patch)
2016-06-20 14:52 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 10760: Alternate Address: Make street number and street type editable (5.10 KB, patch)
2016-06-24 16:08 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 10760: Alternate Address: Display street number and street type (4.85 KB, patch)
2016-06-24 16:09 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 10760: (followup) Move street type after address (1.45 KB, patch)
2016-06-24 16:09 UTC, Kyle M Hall
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Victor Pang 2013-08-19 12:05:25 UTC
The Street Number field seems to be missing from the Alternate Address section. Peeking into the borrowers table in the Koha database, there is a B_streetnumber field defined but it is not exposed in the Koha GUI interface.
Comment 1 Katrin Fischer 2015-01-06 21:11:10 UTC
Still valid.
Comment 2 Marc Véron 2016-06-14 08:33:50 UTC Comment hidden (obsolete)
Comment 3 Marc Véron 2016-06-14 09:07:21 UTC Comment hidden (obsolete)
Comment 4 Mark Tompsett 2016-06-18 00:56:48 UTC
Comment on attachment 52352 [details] [review]
Bug 10760: Alternate Address: Display street number and street type

Review of attachment 52352 [details] [review]:
-----------------------------------------------------------------

::: koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt
@@ +413,5 @@
>   <div id="patron-alternate-address" style="padding-top: 1em;">
>      <h3>Alternate address</h3>
> +
> +    [% IF Koha.Preference( 'AddressFormat' ) %]
> +        [% INCLUDE "member-display-alt-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]

What if the file doesn't exist?
Comment 5 Marc Véron 2016-06-18 04:44:09 UTC
(In reply to M. Tompsett from comment #4)
> Comment on attachment 52352 [details] [review] [review]
> Bug 10760: Alternate Address: Display street number and street type
> 
> Review of attachment 52352 [details] [review] [review]:
> -----------------------------------------------------------------
> 
> ::: koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt
> @@ +413,5 @@
> >   <div id="patron-alternate-address" style="padding-top: 1em;">
> >      <h3>Alternate address</h3>
> > +
> > +    [% IF Koha.Preference( 'AddressFormat' ) %]
> > +        [% INCLUDE "member-display-alt-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
> 
> What if the file doesn't exist?

It works the same as with Bug 4041 - Address Format as a I18N/L10N system preference and Bug 16730 - Use member-display-address-style*-includes in moremember-brief.tt 

Syspref 'AddressFormat' can have 2 values: us and de
----snip---
        - pref: addressformat
          default: us
          choices:
              us: US style ([Street number], [Address] - [City], [Zip/Postal Code], [Country])
              de: German style ([Adress] [Street number] - [Zip/Postal Code] [City] - [Country]
----snip---
For each choice, a file exists:
member-display-alt-address-style-us.inc
member-display-alt-address-style-de.inc

Fallback is us if syspref 'AdressFormat' is not defined

If more formats are needed, you have to
- add an additional syspref value
- add inc files to folder koha-tmpl/intranet-tmpl/prog/en/includes as appropriate
Comment 6 Katrin Fischer 2016-06-19 09:54:47 UTC
Thx for the explanation Marc - looks ok to me.
Comment 7 Owen Leonard 2016-06-20 13:31:04 UTC
The format for US addresses should be:

[Street number] [Address] [Road type]

Correct: 25 Euclid Drive
Incorrect: 25 Drive Euclid
Comment 8 Marc Véron 2016-06-20 14:19:16 UTC Comment hidden (obsolete)
Comment 9 Marc Véron 2016-06-20 14:33:44 UTC
(In reply to Owen Leonard from comment #7)
> The format for US addresses should be:
> 
> [Street number] [Address] [Road type]
> 
> Correct: 25 Euclid Drive
> Incorrect: 25 Drive Euclid

Same issue with main address (introduced by Bug 4041), see Bug 16779
Comment 10 Owen Leonard 2016-06-20 14:52:04 UTC Comment hidden (obsolete)
Comment 11 Owen Leonard 2016-06-20 14:52:12 UTC Comment hidden (obsolete)
Comment 12 Owen Leonard 2016-06-20 14:52:19 UTC Comment hidden (obsolete)
Comment 13 Owen Leonard 2016-06-21 12:43:22 UTC
*** Bug 13996 has been marked as a duplicate of this bug. ***
Comment 14 Kyle M Hall 2016-06-24 16:08:46 UTC
Created attachment 52829 [details] [review]
Bug 10760: Alternate Address: Make street number and street type editable

Table 'borrowers' contain columns B_streetnumber and B_streettype.
This patch makes them editable for alternate address.

To test:
- Apply patch
- Edit a patron's details
- Verify that in edit mode for Alternate address, the fields 'street type' and 'street number' appear
  and follow the settings in sysprefs AddressFormat, BorrowerMandatoryField, BorrowerUnwantedField
- Verify that the values are saved correctly.

Note: A second patch will follow to manage the display of street number and street type
Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 15 Kyle M Hall 2016-06-24 16:09:01 UTC
Created attachment 52830 [details] [review]
Bug 10760: Alternate Address: Display street number and street type

This patch displays alternate streetnumber and street type on patron's
detail page.

To test:
- Apply patch
- Verify that the alternate address information displays follwing the
  setting in syspref AddressFormat and contains street type and
  street number (as appropriate)

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 16 Kyle M Hall 2016-06-24 16:09:04 UTC
Created attachment 52831 [details] [review]
Bug 10760: (followup) Move street type after address

As of comment #7

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 17 Kyle M Hall 2016-07-08 13:46:06 UTC
Pushed to master for 16.11, thanks Marc!
Comment 18 Frédéric Demians 2016-08-01 13:32:52 UTC
Pushed in 16.05. Will be in 16.05.02.