Bug 21085: Fix add/edit of patrons when HouseboundModule is set
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 18 Jul 2018 21:24:50 +0000 (18:24 -0300)
committerNick Clemens <nick@bywatersolutions.com>
Thu, 19 Jul 2018 15:44:03 +0000 (15:44 +0000)
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>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
members/memberentry.pl

index 7f48bfd..e5090b2 100755 (executable)
@@ -223,7 +223,8 @@ if ( $op eq 'insert' || $op eq 'modify' || $op eq 'save' || $op eq 'duplicate' )
         qr/^\d+-DAYS/,
         qr/^patron_attr_/,
         qr/^csrf_token$/,
-        qr/^add_debarment$/, qr/^debarred_expiration$/ # We already dealt with debarments previously
+        qr/^add_debarment$/, qr/^debarred_expiration$/, # We already dealt with debarments previously
+        qr/^housebound_chooser$/, qr/^housebound_deliverer$/,
     );
     for my $regexp (@keys_to_delete) {
         for (keys %newdata) {