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

(-)a/misc/migration_tools/fix_onloan.pl (-20 lines)
Lines 1-19 Link Here
1
#!/usr/bin/perl
2
3
use Modern::Perl;
4
use Koha::Script;
5
use Koha::Items;
6
#
7
# the items.onloan field did not exist in koha 2.2
8
# in koha 3.0, it's used to define item availability
9
# this script takes the items.onloan field
10
# and put it in the MARC::Record of the item
11
#
12
13
my $items = Koha::Items->({ onloan => { '!=' => undef } });
14
15
$|=1;
16
while ( my $item = $items->next ) {
17
    $item->store;
18
    print sprintf "Onloan : %s for %s / %s\n", $item->onloan, $item->biblionumber, $item->itemnumber;
19
}
20
- 

Return to bug 28028