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

(-)a/Koha/AdditionalField.pm (-1 / +1 lines)
Lines 230-236 sub get_matching_record_ids { Link Here
230
        ) AS values$i |;
230
        ) AS values$i |;
231
        $subquery .= ' USING (record_id)' if $i > 1;
231
        $subquery .= ' USING (record_id)' if $i > 1;
232
        push @subqueries, $subquery;
232
        push @subqueries, $subquery;
233
        push @args, $field->{name}, $tablename, ( $exact_match ? $field->{value} : "%$field->{value}%" );
233
        push @args, $field->{name}, $tablename, ( $exact_match or $field->{authorised_value_category} ? $field->{value} : "%$field->{value}%" );
234
    }
234
    }
235
    $query .= join( ' LEFT JOIN ', @subqueries ) . ' WHERE 1';
235
    $query .= join( ' LEFT JOIN ', @subqueries ) . ' WHERE 1';
236
    for my $j ( 1 .. $i ) {
236
    for my $j ( 1 .. $i ) {
(-)a/serials/serials-search.pl (-4 / +6 lines)
Lines 82-89 my $additional_fields = Koha::AdditionalField->all( { tablename => 'subscription Link Here
82
my $additional_field_filters;
82
my $additional_field_filters;
83
for my $field ( @$additional_fields ) {
83
for my $field ( @$additional_fields ) {
84
    my $filter_value = $query->param('additional_field_' . $field->{id} . '_filter');
84
    my $filter_value = $query->param('additional_field_' . $field->{id} . '_filter');
85
    if ( defined ( $filter_value ) ) {
85
    if ( defined $filter_value and $filter_value ne q|| ) {
86
        $additional_field_filters->{ $field->{name} } = $filter_value;
86
        $additional_field_filters->{ $field->{name} } = {
87
            value => $filter_value,
88
            authorised_value_category => $field->{authorised_value_category},
89
        };
87
    }
90
    }
88
    if ( $field->{authorised_value_category} ) {
91
    if ( $field->{authorised_value_category} ) {
89
        $field->{authorised_value_choices} = GetAuthorisedValues( $field->{authorised_value_category} );
92
        $field->{authorised_value_choices} = GetAuthorisedValues( $field->{authorised_value_category} );
Lines 103-109 if ($searched){ Link Here
103
            publisher    => $publisher,
106
            publisher    => $publisher,
104
            bookseller   => $bookseller,
107
            bookseller   => $bookseller,
105
            branch       => $branch,
108
            branch       => $branch,
106
            additional_fields => [ map{ { name => $_, value => $additional_field_filters->{$_}} } keys %$additional_field_filters ],
109
            additional_fields => [ map{ { name => $_, value => $additional_field_filters->{$_}{value}, authorised_value_category => $additional_field_filters->{$_}{authorised_value_category} } } keys %$additional_field_filters ],
107
            location     => $location,
110
            location     => $location,
108
            expiration_date => $expiration_date_dt,
111
            expiration_date => $expiration_date_dt,
109
        }
112
        }
110
- 

Return to bug 10855