View | Details | Raw Unified | Return to bug 20443
Collapse All | Expand All

(-)a/C4/ILSDI/Services.pm (-2 / +12 lines)
Lines 506-513 sub GetPatronInfo { Link Here
506
    if ( $show_attributes && $show_attributes eq "1" ) {
506
    if ( $show_attributes && $show_attributes eq "1" ) {
507
        # FIXME Regression expected here, we do not retrieve the same field as previously
507
        # FIXME Regression expected here, we do not retrieve the same field as previously
508
        # Waiting for answer on bug 14257 comment 15
508
        # Waiting for answer on bug 14257 comment 15
509
        my $attrs = $patron->extended_attributes->search({ opac_display => 1 })->unblessed;
509
        $borrower->{'attributes'} = [
510
        $borrower->{'attributes'} = $attrs;
510
            map {
511
                $_->type->opac_display
512
                  ? {
513
                    %{ $_->unblessed },
514
                    %{ $_->type->unblessed },
515
                    value             => $_->attribute,   # Backward compatibility
516
                    value_description => $_->description, # Awkward retro-compability...
517
                  }
518
                  : ()
519
            } $patron->extended_attributes->search
520
        ];
511
    }
521
    }
512
522
513
    # Add is expired information
523
    # Add is expired information
(-)a/t/db_dependent/ILSDI_Services.t (-7 / +4 lines)
Lines 217-229 subtest 'GetPatronInfo/GetBorrowerAttributes test for extended patron attributes Link Here
217
217
218
    # Build a structure for comparison:
218
    # Build a structure for comparison:
219
    my $cmp = {
219
    my $cmp = {
220
        category_code     => $attr_type_visible->{'category_code'},
220
        borrowernumber    => $brwr->{borrowernumber},
221
        class             => $attr_type_visible->{'class'},
222
        code              => $attr_shown->{'code'},
223
        description       => $attr_type_visible->{'description'},
224
        display_checkout  => $attr_type_visible->{'display_checkout'},
225
        value             => $attr_shown->{'attribute'},
221
        value             => $attr_shown->{'attribute'},
226
        value_description => undef,
222
        value_description => $attr_shown->{'attribute'},
223
        %$attr_type_visible,
224
        %$attr_shown,
227
    };
225
    };
228
226
229
    is( $reply->{'charges'}, '10.00',
227
    is( $reply->{'charges'}, '10.00',
230
- 

Return to bug 20443