Bug 26940: don't reset debarredcomment on patron update

Test plan:
1) Create a patron
2) In koha/members/moremember.pl add a manual restriction, with comment foobar
3) try to checkout, you have a message like
    Restricted: Patron's account is restricted with the explanation:
      foobar
4) Got to Edit patron, save
5) try to checkout, foobar is no more
    Restricted: Patron's account is restricted with the explanation:
6) Apply patch
7) Redo 1-4
8) try to checkout, foobar is there.

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Katariina Hanhisalo <katariina.hanhisalo@xamk.fi>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Didier Gautheron 2020-11-05 15:04:41 +01:00 committed by Jonathan Druart
parent d82684a328
commit 3b9f1e1560
1 changed files with 1 additions and 3 deletions

View File

@ -243,7 +243,7 @@ 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$/, qr/^remove_debarment$/, # We already dealt with debarments previously
qr/^add_debarment$/, qr/^debarred_comment$/,qr/^debarred_expiration$/, qr/^remove_debarment$/, # We already dealt with debarments previously
qr/^housebound_chooser$/, qr/^housebound_deliverer$/,
qr/^select_city$/,
qr/^new_guarantor_/,
@ -530,8 +530,6 @@ if ((!$nok) and $nodouble and ($op eq 'insert' or $op eq 'save')){
delete $newdata{'B_email'};
}
$newdata{debarredcomment} = $newdata{debarred_comment};
delete $newdata{debarred_comment};
delete $newdata{password2};
eval {