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

(-)a/Koha/Item.pm (-3 / +2 lines)
Lines 565-573 we still expect the item to end up at a final location eventually. Link Here
565
sub get_transfer {
565
sub get_transfer {
566
    my ($self) = @_;
566
    my ($self) = @_;
567
567
568
    my $transfer = $self->_result->current_branchtransfers;
568
    my $transfer = $self->_result->current_branchtransfers->next;
569
569
    return  Koha::Item::Transfer->_new_from_dbic($transfer) if $transfer;
570
    return Koha::Item::Transfers->_new_from_dbic($transfer)->next;
571
}
570
}
572
571
573
=head3 get_transfers
572
=head3 get_transfers
(-)a/t/db_dependent/Koha/Item.t (-1 / +1 lines)
Lines 2189-2195 subtest 'current_branchtransfers relationship' => sub { Link Here
2189
    );
2189
    );
2190
    my $transfers = $item->_result->current_branchtransfers;
2190
    my $transfers = $item->_result->current_branchtransfers;
2191
    is( ref($transfers), 'DBIx::Class::ResultSet',
2191
    is( ref($transfers), 'DBIx::Class::ResultSet',
2192
        'current_branchtransfers returns a Koha::Item::Transfers object set' );
2192
        'current_branchtransfers returns a DBIx::Class::ResultSet' );
2193
    is( $transfers->count, 0,
2193
    is( $transfers->count, 0,
2194
        "Empty Koha::Item::Transfers set returned if no return_claims" );
2194
        "Empty Koha::Item::Transfers set returned if no return_claims" );
2195
    my $transfer1 = $builder->build(
2195
    my $transfer1 = $builder->build(
(-)a/t/db_dependent/Koha/Items.t (-2 / +1 lines)
Lines 1390-1396 subtest 'get_transfer' => sub { Link Here
1390
    );
1390
    );
1391
1391
1392
    $transfer = $new_item_1->get_transfer();
1392
    $transfer = $new_item_1->get_transfer();
1393
    is( ref($transfer), 'Koha::Item::Transfer', 'Koha::Item->get_transfer should return a Koha::Item::Transfers object' );
1393
    is( ref($transfer), 'Koha::Item::Transfer', 'Koha::Item->get_transfer should return a Koha::Item::Transfer object' );
1394
1394
1395
    my $transfer_2 = $builder->build_object(
1395
    my $transfer_2 = $builder->build_object(
1396
        {
1396
        {
1397
- 

Return to bug 33493