Bug 21136

Summary: Error "No property select_city for Koha::Patron" when saving patron record
Product: Koha Reporter: Owen Leonard <oleonard>
Component: PatronsAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: critical    
Priority: P5 - low CC: gmcharlt, kyle.m.hall, martin.renvoize, tomascohen
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21085
GIT URL: Change sponsored?: ---
Patch complexity: Trivial patch Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 20287    
Bug Blocks:    
Attachments: Bug 21136: Fix add/edit patron when cities are defined
Bug 21136: Fix add/edit patron when cities are defined
Bug 21136: Fix add/edit patron when cities are defined

Description Owen Leonard 2018-08-01 12:52:38 UTC
When I edit an existing patron in master, I get an error upon saving: 

No property select_city for Koha::Patron at /usr/share/perl5/Exception/Class/Base.pm line 73

To reproduce this error you must have cities defined in Administration -> Cities & towns.
Comment 1 Jonathan Druart 2018-08-01 13:00:58 UTC
Created attachment 77362 [details] [review]
Bug 21136: Fix add/edit patron when cities are defined

Same as bug 21085.

When cities are defined, there is a select with name="select_city" added
to the DOM and its value will be passed to memberentry.pl
We must remove it from the attribute list before creating the
Koha::Patron object

No property select_city for Koha::Patron at
/usr/share/perl5/Exception/Class/Base.pm line 73

Test plan:
Define cities
Add or edit a patron, save
Comment 2 Owen Leonard 2018-08-01 13:34:30 UTC
Created attachment 77366 [details] [review]
Bug 21136: Fix add/edit patron when cities are defined

Same as bug 21085.

When cities are defined, there is a select with name="select_city" added
to the DOM and its value will be passed to memberentry.pl
We must remove it from the attribute list before creating the
Koha::Patron object

No property select_city for Koha::Patron at
/usr/share/perl5/Exception/Class/Base.pm line 73

Test plan:
Define cities
Add or edit a patron, save

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 3 Katrin Fischer 2018-08-01 15:05:43 UTC
Created attachment 77374 [details] [review]
Bug 21136: Fix add/edit patron when cities are defined

Same as bug 21085.

When cities are defined, there is a select with name="select_city" added
to the DOM and its value will be passed to memberentry.pl
We must remove it from the attribute list before creating the
Koha::Patron object

No property select_city for Koha::Patron at
/usr/share/perl5/Exception/Class/Base.pm line 73

Test plan:
Define cities
Add or edit a patron, save

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Tomás Cohen Arazi (tcohen) 2018-08-02 13:12:29 UTC
Pushed to master. Thanks all!
Comment 5 Martin Renvoize (ashimema) 2018-08-03 14:11:48 UTC
Depends on (and is caused by) but 20287 which is not in 18.05.x series.