Bug 21085 - Can't edit patrons with housebound module active
Summary: Can't edit patrons with housebound module active
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: master
Hardware: All All
: P5 - low major (vote)
Assignee: Jonathan Druart
QA Contact: Josef Moravec
URL:
Keywords:
Depends on: 20287
Blocks: 20828
  Show dependency treegraph
 
Reported: 2018-07-18 19:50 UTC by Katrin Fischer
Modified: 2019-10-14 19:58 UTC (History)
6 users (show)

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


Attachments
Bug 21085: Fix add/edit of patrons when HouseboundModule is set (1.59 KB, patch)
2018-07-18 21:28 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 21085: Fix add/edit of patrons when HouseboundModule is set (1.64 KB, patch)
2018-07-19 05:58 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 21085: Fix add/edit of patrons when HouseboundModule is set (1.69 KB, patch)
2018-07-19 12:01 UTC, Josef Moravec
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2018-07-18 19:50:10 UTC
When the housebound module is activated, trying to save a patron record after editing it will result in an internal server errror:

No property housebound_deliverer for Koha::Patron

To test:
- Activate housebound, system preference: HouseboundModule
- Edit a patron using the edit button in the toolbar
- Save the patron
- Verify you get an Internal server error.
Comment 1 Jonathan Druart 2018-07-18 21:21:05 UTC
On creating the error is:
Patron creation failed! - DBIx::Class::Row::store_column(): No such column 'housebound_chooser' on Koha::Schema::Result::Borrower at /home/vagrant/kohaclone/Koha/Object.pm line 75
Comment 2 Jonathan Druart 2018-07-18 21:25:15 UTC
Caused by bug 20287.
Comment 3 Jonathan Druart 2018-07-18 21:28:41 UTC Comment hidden (obsolete)
Comment 4 Katrin Fischer 2018-07-19 05:58:16 UTC Comment hidden (obsolete)
Comment 5 Josef Moravec 2018-07-19 12:01:10 UTC
Created attachment 77102 [details] [review]
Bug 21085: Fix add/edit of patrons when HouseboundModule is set

This script takes all the parameters then set it to create/edit the
patron. We must list housebound_chooser and housebound_deliverer as not
part of patron's attributes

Test plan:
- Enable HouseboundModule
- Create a patron
=> When you save, if the patch is not applied, you will get:
No property housebound_deliverer for Koha::Patron

- Edit a patron
=> When you save, if the patch is not applied, you will get:
Patron creation failed! - DBIx::Class::Row::store_column(): No such column 'housebound_chooser' on Koha::Schema::Result::Borrower at /home/vagrant/kohaclone/Koha/Object.pm line 75

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 6 Nick Clemens 2018-07-19 17:39:26 UTC
Awesome work all!

Pushed to master for 18.11
Comment 7 Martin Renvoize 2018-08-02 13:35:45 UTC
Depends on (and is caused by) but 20287 which is not in 18.05.x series.