Bug 15644 - City dropdown default selection when modifying a patron matches only on city
Summary: City dropdown default selection when modifying a patron matches only on city
Status: Pushed to Stable
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Whiteboard:
Keywords: Academy
: 18744 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-01-22 15:05 UTC by Nick Clemens
Modified: 2017-11-23 23:21 UTC (History)
8 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Example (9.97 KB, image/png)
2017-06-07 15:16 UTC, Kyle M Hall
Details
Bug 15644 - City dropdown default selection when modifying a patron matches only on city (3.96 KB, patch)
2017-06-08 16:22 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 15644 - City dropdown default selection when modifying a patron matches only on city (3.98 KB, patch)
2017-08-15 12:33 UTC, Amit Gupta
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 15644 - City dropdown default selection when modifying a patron matches only on city (4.09 KB, patch)
2017-09-08 17:11 UTC, Nick Clemens
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens 2016-01-22 15:05:37 UTC
When modifying a patron the dropdown for cities selection tries to select the existing patron's info in the city dropdown menu but matches only on city

For cities with multiple zipcodes, or states with matching city names it can select the wrong info.

This does not affect data entry, but can be confusing to staff.

To recreate:
1 - Enter two cities via Administration->Patrons and circulation->Cities and towns:
    Springfield, MA 01101
    Springfield, VT 05156
2 - Edit a patron chossing Springfield VT
3 - Load thei record in the editor and note that Springfield MA is the selected value in the dropdown

Either we should match on zipcode (unique id?) or default to blank
Comment 1 Kyle M Hall 2017-06-07 15:16:14 UTC
*** Bug 18744 has been marked as a duplicate of this bug. ***
Comment 2 Kyle M Hall 2017-06-07 15:16:31 UTC
Created attachment 64082 [details]
Example
Comment 3 Owen Leonard 2017-06-08 16:22:06 UTC
Created attachment 64111 [details] [review]
Bug 15644 - City dropdown default selection when modifying a patron matches only on city

This patch modifies the include files which contain the form fields for
city, state, zipcode, etc. shown on the patron entry screen. The files
are modified so that the city/state/zip <select> preselects a value
based on city, state, and zipcode matching the values in the
corresponding text fields.

To test, confirm that the bug's steps to reproduce are fixed:

- Enter two cities via Administration -> Patrons and circulation
  -> Cities and towns:
    Springfield, MA 01101
    Springfield, VT 05156
- Edit a patron choosing, Springfield VT, and save.
- Edit the patron again and confirm that the correct city is
  pre-selected.
- Confirm this result with all three different settings of the
  "AddressFormat" system preference.
Comment 4 Amit Gupta 2017-08-15 12:33:28 UTC
Created attachment 66010 [details] [review]
Bug 15644 - City dropdown default selection when modifying a  patron matches only on city

Works perfectly.
Comment 5 Nick Clemens 2017-09-08 17:11:54 UTC
Created attachment 67002 [details] [review]
[SIGNED-OFF] Bug 15644 - City dropdown default selection when modifying a patron matches only on city

This patch modifies the include files which contain the form fields for
city, state, zipcode, etc. shown on the patron entry screen. The files
are modified so that the city/state/zip <select> preselects a value
based on city, state, and zipcode matching the values in the
corresponding text fields.

To test, confirm that the bug's steps to reproduce are fixed:

- Enter two cities via Administration -> Patrons and circulation
  -> Cities and towns:
    Springfield, MA 01101
    Springfield, VT 05156
- Edit a patron choosing, Springfield VT, and save.
- Edit the patron again and confirm that the correct city is
  pre-selected.
- Confirm this result with all three different settings of the
  "AddressFormat" system preference.

Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 6 Jonathan Druart 2017-09-19 14:48:56 UTC
Pushed to master for 17.11, thanks to everybody involved!
Comment 7 Fridolin SOMERS 2017-10-23 14:56:42 UTC
Pushed to 17.05.x, will be in 17.05.06.
Comment 8 Katrin Fischer 2017-10-29 18:04:24 UTC
This patch has been pushed to 16.11.x and will be in 16.11.14.

Note: French format doesn't exist in 16.11.x and has been removed from the patch.
Comment 9 Mason James 2017-11-23 23:21:02 UTC
Pushed to 16.05.x, for 16.05.19 release