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

(-)a/Koha/ILL/Request/Workflow/HistoryCheck.pm (-1 / +3 lines)
Lines 195-202 sub _find_matching_requests { Link Here
195
195
196
    my $patron = Koha::Patrons->find( { cardnumber => $self->{metadata}->{cardnumber} } );
196
    my $patron = Koha::Patrons->find( { cardnumber => $self->{metadata}->{cardnumber} } );
197
197
198
    return 0 unless $patron;
199
198
    my $query;
200
    my $query;
199
    $query->{'-and'} = [ { 'me.borrowernumber' => $patron->borrowernumber } ] if $patron;
201
    $query->{'-and'} = [ { 'me.borrowernumber' => $patron->borrowernumber } ];
200
    foreach my $id_field (@existing_id_fields) {
202
    foreach my $id_field (@existing_id_fields) {
201
        push @{ $query->{'-or'} }, {
203
        push @{ $query->{'-or'} }, {
202
            'illrequestattributes.type'  => $id_field,
204
            'illrequestattributes.type'  => $id_field,
(-)a/t/db_dependent/Koha/ILL/Request/Workflow/HistoryCheck.t (-4 / +5 lines)
Lines 126-139 subtest 'after_request_created' => sub { Link Here
126
126
127
    my $fake_cardnumber = '123456789';
127
    my $fake_cardnumber = '123456789';
128
    my $metadata        = {
128
    my $metadata        = {
129
        title  => 'This is a title',
129
        title      => 'This is a title',
130
        author => 'This is an author',
130
        author     => 'This is an author',
131
        isbn   => $isbn
131
        isbn       => $isbn,
132
        cardnumber => $fake_cardnumber,
132
    };
133
    };
133
134
134
    my $authenticated_patron = $builder->build_object(
135
    my $authenticated_patron = $builder->build_object(
135
        {
136
        {
136
            class => 'Koha::Patrons',
137
            class => 'Koha::Patrons',
138
            value => { cardnumber => $fake_cardnumber }
137
        }
139
        }
138
    );
140
    );
139
141
140
- 

Return to bug 38441