Bug 26436 - Quick add patron will not copy over details from cities and towns pull down into patron details
Summary: Quick add patron will not copy over details from cities and towns pull down i...
Status: Patch doesn't apply
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low normal (vote)
Assignee: Lucas Gass
QA Contact: Testopia
URL:
Keywords:
Depends on: 3766
Blocks:
  Show dependency treegraph
 
Reported: 2020-09-11 16:41 UTC by Dale
Modified: 2021-04-22 11:39 UTC (History)
6 users (show)

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


Attachments
Bug 26436: fix city/town pulldown (2.08 KB, patch)
2021-01-21 04:20 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 26436: fix city/town pulldown (2.14 KB, patch)
2021-01-21 14:42 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review
Bug 26436: fix city/town pulldown in all cases (2.06 KB, patch)
2021-02-12 21:38 UTC, Lucas Gass
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Dale 2020-09-11 16:41:34 UTC
When using the quick add patron option in koha 19.11 : 

If a library has cities and towns pre-populated in a drop down list and has added this field into the quick add patron form this information will not copy into the full patron form after saving.

This was fixed in bug 18569 for 17.11 but is not working in 19.11.
Comment 1 Jonathan Druart 2020-12-02 14:39:55 UTC
Confirmed in master.
Certainly broken by
  commit 4605d76a73f9b13ba3b0259e3f480fb396051309
  Bug 3766: Cities/Towns only on one address
Comment 2 Lucas Gass 2021-01-21 04:20:32 UTC Comment hidden (obsolete)
Comment 3 PTFS Europe Sandboxes 2021-01-21 14:42:41 UTC Comment hidden (obsolete)
Comment 4 Julian Maurice 2021-02-12 09:47:34 UTC
It doesn't populate the City field for the alternate contact address. Probably because the input's name is "altcontactaddress3" and thus doesn't end with "city".
Can it be fixed ?
Other than that the patch works well.
Comment 5 Lucas Gass 2021-02-12 21:38:01 UTC
Created attachment 116852 [details] [review]
Bug 26436: fix city/town pulldown in all cases

This patch uses a different selector to target the inputs and accounts for the fact that altcontactcity is actually called altcontactaddress3

1. add some cities to /cgi-bin/koha/admin/cities.pl with city, state, zipcode, and country defined
2. On PatronQuickAddFields select all, this way we can test all the alternate city selects
3. Go to quick add patron, and select a city from the dropdown, the city/state/zip/country doesn't populate (Alternate address city doesnt work either)
4. Apply patch
5. Do 1 - 3 again, it should work
6. Try the regular patron form, make sure all city/town dropdowns still work
Comment 6 Lucas Gass 2021-02-12 21:43:59 UTC
(In reply to Julian Maurice from comment #4)
> It doesn't populate the City field for the alternate contact address.
> Probably because the input's name is "altcontactaddress3" and thus doesn't
> end with "city".
> Can it be fixed ?
> Other than that the patch works well.

Good catch. Is my new patch too much of a work around now? It's too bad that the alternate contact city field is borrowers.altcontactaddress3 in the database while state, zipcode, and country are altcontactstate, altcontactzipcode, and altcontactcountry.

But fixing that seems to be out of the scope of this bug.