Bug 20443: Move GetBorrowerAttributes to Koha::Patron - ILSDI
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 13 Jul 2018 12:01:03 +0000 (09:01 -0300)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Mon, 23 Mar 2020 13:39:20 +0000 (13:39 +0000)
FIXME See comment

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
C4/ILSDI/Services.pm

index 23c4022..0416f5c 100644 (file)
@@ -33,7 +33,6 @@ use HTML::Entities;
 use CGI qw ( -utf8 );
 use DateTime;
 use C4::Auth;
-use C4::Members::Attributes qw(GetBorrowerAttributes);
 use Koha::DateUtils;
 
 use Koha::Biblios;
@@ -505,7 +504,9 @@ sub GetPatronInfo {
 
     my $show_attributes = $cgi->param('show_attributes');
     if ( $show_attributes && $show_attributes eq "1" ) {
-        my $attrs = GetBorrowerAttributes( $borrowernumber, 1 );
+        # FIXME Regression expected here, we do not retrieve the same field as previously
+        # Waiting for answer on bug 14257 comment 15
+        my $attrs = $patron->get_extended_attributes->search({ opac_display => 1 })->unblessed;
         $borrower->{'attributes'} = $attrs;
     }