Bug 18552: Borrower debarments not showing on member detail page
authorAleisha Amohia <aleishaamohia@hotmail.com>
Thu, 18 May 2017 23:10:13 +0000 (23:10 +0000)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 19 May 2017 14:35:48 +0000 (10:35 -0400)
To test:
1) Go to a borrowers details page and create a manual restriction
2) Notice the restriction shows at the top of the page but the
restriction tab says the member is currently unrestricted
3) Apply patch and refresh page
4) Restrictions tab should now correctly show debarments and correct
number is shown
5) Confirming deleting and adding restrictions still works as expected

Sponsored-by: Catalyst IT
Followed test plan, works as expected
Signed-off-by: Marc VĂ©ron <veron@veron.ch>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
members/moremember.pl

index 420bc41..0027099 100755 (executable)
@@ -155,7 +155,11 @@ for (qw(gonenoaddress lost borrowernotes)) {
 }
 
 if ( $patron->is_debarred ) {
-    $template->param( 'userdebarred' => 1, 'flagged' => 1 );
+    $template->param(
+        userdebarred => 1,
+        flagged => 1,
+        debarments => GetDebarments({ borrowernumber => $borrowernumber }),
+    );
     my $debar = $data->{'debarred'};
     if ( $debar ne "9999-12-31" ) {
         $template->param( 'userdebarreddate' => output_pref( { dt => dt_from_string( $debar ), dateonly => 1 } ) );
@@ -359,7 +363,6 @@ $template->param(
     AutoResumeSuspendedHolds => C4::Context->preference('AutoResumeSuspendedHolds'),
     SuspendHoldsIntranet => C4::Context->preference('SuspendHoldsIntranet'),
     RoutingSerials => C4::Context->preference('RoutingSerials'),
-    debarments => GetDebarments({ borrowernumber => $borrowernumber }),
     PatronsPerPage => C4::Context->preference("PatronsPerPage") || 20,
     relatives_issues_count => $relatives_issues_count,
     relatives_borrowernumbers => \@relatives,