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

(-)a/C4/Circulation.pm (+6 lines)
Lines 1729-1734 sub AddIssue { Link Here
1729
                        %$issue_attributes,
1729
                        %$issue_attributes,
1730
                    }
1730
                    }
1731
                )->store;
1731
                )->store;
1732
1733
                # Ensure item is no longer listed in the holds queue
1734
                $dbh->do(
1735
                    q{DELETE tmp_holdsqueue, hold_fill_targets FROM tmp_holdsqueue LEFT JOIN hold_fill_targets USING ( itemnumber ) WHERE itemnumber = ?},
1736
                    undef, $item_object->id
1737
                );
1732
            }
1738
            }
1733
            $issue->discard_changes;
1739
            $issue->discard_changes;
1734
            $patron->update_lastseen('check_out');
1740
            $patron->update_lastseen('check_out');
(-)a/t/db_dependent/HoldsQueue.t (-5 / +9 lines)
Lines 2114-2121 subtest 'Remove item from holds queue on checkout' => sub { Link Here
2114
        }
2114
        }
2115
    );
2115
    );
2116
2116
2117
    my $item = $builder->build_sample_item(
2117
    my $item = $builder->build_sample_item( { homebranch => $lib->branchcode, holdingbranch => $lib->branchcode } );
2118
        { homebranch => $lib->branchcode, holdingbranch => $lib->branchcode } );
2119
2118
2120
    t::lib::Mocks::mock_userenv( { branchcode => $lib->branchcode } );
2119
    t::lib::Mocks::mock_userenv( { branchcode => $lib->branchcode } );
2121
2120
Lines 2131-2141 subtest 'Remove item from holds queue on checkout' => sub { Link Here
2131
2130
2132
    C4::HoldsQueue::CreateQueue();
2131
    C4::HoldsQueue::CreateQueue();
2133
2132
2134
    is( Koha::Hold::HoldsQueueItems->search({ itemnumber => $item->id })->count(), 1, "Item is found in the holds queue" );
2133
    is(
2134
        Koha::Hold::HoldsQueueItems->search( { itemnumber => $item->id } )->count(), 1,
2135
        "Item is found in the holds queue"
2136
    );
2135
2137
2136
    AddIssue( $patron1, $item->barcode, dt_from_string );
2138
    AddIssue( $patron1, $item->barcode, dt_from_string );
2137
2139
2138
    is( Koha::Hold::HoldsQueueItems->search({ itemnumber => $item->id })->count(), 0, "Item is no longer found in the holds queue" );
2140
    is(
2141
        Koha::Hold::HoldsQueueItems->search( { itemnumber => $item->id } )->count(), 0,
2142
        "Item is no longer found in the holds queue"
2143
    );
2139
2144
2140
    $schema->storage->txn_rollback;
2145
    $schema->storage->txn_rollback;
2141
};
2146
};
2142
- 

Return to bug 35357