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

(-)a/t/db_dependent/Circulation.t (-1 / +2 lines)
Lines 3420-3425 subtest 'Cancel transfers on lost items' => sub { Link Here
3420
        from_branch => $library_1->{branchcode},
3420
        from_branch => $library_1->{branchcode},
3421
        to_branch => $library_2->{branchcode},
3421
        to_branch => $library_2->{branchcode},
3422
        barcode   => $item->barcode,
3422
        barcode   => $item->barcode,
3423
        trigger   => 'Reserve',
3423
    });
3424
    });
3424
    my $hold = Koha::Holds->find( $reserve_id );
3425
    my $hold = Koha::Holds->find( $reserve_id );
3425
    is( $hold->found, 'T', 'Hold is in transit' );
3426
    is( $hold->found, 'T', 'Hold is in transit' );
Lines 4682-4688 subtest 'Checkout should correctly terminate a transfer' => sub { Link Here
4682
4683
4683
    my $do_transfer = 1;
4684
    my $do_transfer = 1;
4684
    ModItemTransfer( $item->itemnumber, $library_1->branchcode,
4685
    ModItemTransfer( $item->itemnumber, $library_1->branchcode,
4685
        $library_2->branchcode );
4686
        $library_2->branchcode, 'Manual' );
4686
    ModReserveAffect( $item->itemnumber, undef, $do_transfer, $reserve_id );
4687
    ModReserveAffect( $item->itemnumber, undef, $do_transfer, $reserve_id );
4687
    GetOtherReserves( $item->itemnumber )
4688
    GetOtherReserves( $item->itemnumber )
4688
      ;    # To put the Reason, it's what does returns.pl...
4689
      ;    # To put the Reason, it's what does returns.pl...
(-)a/t/db_dependent/Circulation/transfers.t (-6 / +13 lines)
Lines 111-120 my $item_id4 = Koha::Item->new( Link Here
111
)->store->itemnumber;
111
)->store->itemnumber;
112
112
113
#Add transfers
113
#Add transfers
114
my $trigger = 'Manual';
114
ModItemTransfer(
115
ModItemTransfer(
115
    $item_id1,
116
    $item_id1,
116
    $branchcode_1,
117
    $branchcode_1,
117
    $branchcode_2
118
    $branchcode_2,
119
    $trigger
118
);
120
);
119
121
120
my $item_obj = Koha::Items->find({ itemnumber => $item_id1 });
122
my $item_obj = Koha::Items->find({ itemnumber => $item_id1 });
Lines 123-136 is( $item_obj->holdingbranch, $branchcode_1, "Item should be held at branch that Link Here
123
ModItemTransfer(
125
ModItemTransfer(
124
    $item_id2,
126
    $item_id2,
125
    $branchcode_1,
127
    $branchcode_1,
126
    $branchcode_2
128
    $branchcode_2,
129
    $trigger
127
);
130
);
128
131
129
# Add an "unsent" transfer for tests
132
# Add an "unsent" transfer for tests
130
ModItemTransfer(
133
ModItemTransfer(
131
    $item_id3,
134
    $item_id3,
132
    $branchcode_1,
135
    $branchcode_1,
133
    $branchcode_2
136
    $branchcode_2,
137
    $trigger
134
);
138
);
135
my $transfer_requested = Koha::Item::Transfers->search( { itemnumber => $item_id3 }, { rows => 1 })->single;
139
my $transfer_requested = Koha::Item::Transfers->search( { itemnumber => $item_id3 }, { rows => 1 })->single;
136
$transfer_requested->set({ daterequested => dt_from_string, datesent => undef })->store;
140
$transfer_requested->set({ daterequested => dt_from_string, datesent => undef })->store;
Lines 139-145 $transfer_requested->set({ daterequested => dt_from_string, datesent => undef }) Link Here
139
ModItemTransfer(
143
ModItemTransfer(
140
    $item_id4,
144
    $item_id4,
141
    $branchcode_1,
145
    $branchcode_1,
142
    $branchcode_2
146
    $branchcode_2,
147
    $trigger
143
);
148
);
144
my $transfer_cancelled = Koha::Item::Transfers->search( { itemnumber => $item_id4 }, { rows => 1 })->single;
149
my $transfer_cancelled = Koha::Item::Transfers->search( { itemnumber => $item_id4 }, { rows => 1 })->single;
145
$transfer_cancelled->set( { daterequested => dt_from_string, datesent => undef, datecancelled => dt_from_string } )->store;
150
$transfer_cancelled->set( { daterequested => dt_from_string, datesent => undef, datecancelled => dt_from_string } )->store;
Lines 239-251 $dbh->do("DELETE FROM branchtransfers"); Link Here
239
ModItemTransfer(
244
ModItemTransfer(
240
    $item_id1,
245
    $item_id1,
241
    $branchcode_1,
246
    $branchcode_1,
242
    $branchcode_2
247
    $branchcode_2,
248
    $trigger
243
);
249
);
244
my $transfer = Koha::Item::Transfers->search()->next();
250
my $transfer = Koha::Item::Transfers->search()->next();
245
ModItemTransfer(
251
ModItemTransfer(
246
    $item_id1,
252
    $item_id1,
247
    $branchcode_1,
253
    $branchcode_1,
248
    $branchcode_2
254
    $branchcode_2,
255
    $trigger
249
);
256
);
250
$transfer->{_result}->discard_changes;
257
$transfer->{_result}->discard_changes;
251
ok( $transfer->datearrived, 'Date arrived is set when new transfer is initiated' );
258
ok( $transfer->datearrived, 'Date arrived is set when new transfer is initiated' );
(-)a/t/db_dependent/ILSDI_Services.t (-2 / +1 lines)
Lines 643-649 subtest 'GetRecords' => sub { Link Here
643
        }
643
        }
644
    });
644
    });
645
645
646
    ModItemTransfer($item->itemnumber, $branch1->{branchcode}, $branch2->{branchcode});
646
    ModItemTransfer($item->itemnumber, $branch1->{branchcode}, $branch2->{branchcode}, 'Manual');
647
647
648
    my $cgi = CGI->new;
648
    my $cgi = CGI->new;
649
    $cgi->param(service => 'GetRecords');
649
    $cgi->param(service => 'GetRecords');
650
- 

Return to bug 24446