Bug 18112

Summary: Add street type to main address in OPAC
Product: Koha Reporter: Corinne Hayet <corinne.hayet>
Component: OPACAssignee: Lucas Gass <lucas>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: caroline.cyr-la-rose, dubyk, fridolin.somers, jonathan.druart, katrin.fischer, lucas
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28313
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
21.05.00
Bug Depends on:    
Bug Blocks: 28313, 28511    
Attachments: Bug 18112: Add street type to self reg/self mod form
Bug 18112: (follow-up) add required class to select
Bug 18112: Add street type to self reg/self mod form
Bug 18112: (follow-up) add required class to select
Bug 18112: Add street type to self reg/self mod form
Bug 18112: (follow-up) add required class to select
Bug 18112: Use GetAuthValueDropbox from the template

Description Corinne Hayet 2017-02-14 13:00:11 UTC
streettype is missing in opac-memberentry.pl, we cannot have a complete address
Comment 1 Caroline Cyr La Rose 2020-07-22 13:26:47 UTC
I confirm that this is still the case in master
Comment 2 Lucas Gass 2021-05-04 17:49:07 UTC
streettype is also missing on memberentrygen.tt yet it exists as an option on  BorrowerMandatoryField and PatronSelfRegistrationBorrowerMandatoryField.

If you add street type to either of these system preference you can never complete the form.
Comment 3 Lucas Gass 2021-05-04 20:25:04 UTC
(In reply to Lucas Gass from comment #2)
> streettype is also missing on memberentrygen.tt yet it exists as an option
> on  BorrowerMandatoryField and PatronSelfRegistrationBorrowerMandatoryField.
> 
> If you add street type to either of these system preference you can never
> complete the form.

I am mistaken. Streettype will appear on memberentrygen.tt IF the AV ROADTYPE contains values. 

It is missing from the OPAC.
Comment 4 Lucas Gass 2021-05-04 20:53:48 UTC
Created attachment 120476 [details] [review]
Bug 18112: Add street type to self reg/self mod form

1. Add some values to the ROADTYPE authorized value
2. Go to PatronSelfRegistrationBorrowerUnwantedField and make sure streettype is NOT checked
3. Go the self reg form, no street type field
4. Apply patch
5. Check the self reg form, streettype should be there with all the options defined in ROADTYPE a.v.
6. Check the self modification form, street type should be there.
7. Make sure PatronSelfRegistrationBorrowerUnwantedField and PatronSelfModificationBorrowerUnwantedField hide the field correctly.
8. Make sure PatronSelfRegistrationBorrowerMandatoryField properly makes the field required.
Comment 5 Owen Leonard 2021-05-07 11:44:51 UTC
This works as expected except for one thing: A required street type <select> is not caught by the client-side validation. In the template the tag is missing "class="[% required.streettype | html %]"
Comment 6 Lucas Gass 2021-05-07 19:01:33 UTC
Created attachment 120720 [details] [review]
Bug 18112: (follow-up) add required class to select
Comment 7 Owen Leonard 2021-05-10 12:12:17 UTC
Created attachment 120770 [details] [review]
Bug 18112: Add street type to self reg/self mod form

1. Add some values to the ROADTYPE authorized value
2. Go to PatronSelfRegistrationBorrowerUnwantedField and make sure
   streettype is NOT checked
3. Go the self reg form, no street type field
4. Apply patch
5. Check the self reg form, streettype should be there with all the
   options defined in ROADTYPE a.v.
6. Check the self modification form, street type should be there.
7. Make sure PatronSelfRegistrationBorrowerUnwantedField and
   PatronSelfModificationBorrowerUnwantedField hide the field correctly.
8. Make sure PatronSelfRegistrationBorrowerMandatoryField properly makes
   the field required.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 8 Owen Leonard 2021-05-10 12:12:21 UTC
Created attachment 120771 [details] [review]
Bug 18112: (follow-up) add required class to select

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 9 Katrin Fischer 2021-05-10 20:44:14 UTC
I think this is a needed change and I don't want to block it. But should we not open a new bug for adding the street type to alternate address as well to match the staff side?
Comment 10 Katrin Fischer 2021-05-10 20:45:44 UTC
Created attachment 120809 [details] [review]
Bug 18112: Add street type to self reg/self mod form

1. Add some values to the ROADTYPE authorized value
2. Go to PatronSelfRegistrationBorrowerUnwantedField and make sure
   streettype is NOT checked
3. Go the self reg form, no street type field
4. Apply patch
5. Check the self reg form, streettype should be there with all the
   options defined in ROADTYPE a.v.
6. Check the self modification form, street type should be there.
7. Make sure PatronSelfRegistrationBorrowerUnwantedField and
   PatronSelfModificationBorrowerUnwantedField hide the field correctly.
8. Make sure PatronSelfRegistrationBorrowerMandatoryField properly makes
   the field required.

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 11 Katrin Fischer 2021-05-10 20:45:50 UTC
Created attachment 120810 [details] [review]
Bug 18112: (follow-up) add required class to select

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 12 Jonathan Druart 2021-05-11 13:36:34 UTC
Created attachment 120841 [details] [review]
Bug 18112: Use GetAuthValueDropbox from the template
Comment 13 Jonathan Druart 2021-05-11 13:39:10 UTC
Pushed to master for 21.05, thanks to everybody involved!
Comment 14 Fridolin Somers 2021-05-12 15:16:28 UTC
Does not apply on 20.11.x.
Please provide patches if needed.