Bug 26285: Follow E.164 pattern for validating SMS numbers
[koha.git] / misc / migration_tools / fix_onloan.pl
bloba7a8638d19501a3f73c2aefcd1b31e8b89d24d05
1 #!/usr/bin/perl
3 use Modern::Perl;
4 use Koha::Script;
5 use Koha::Items;
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
13 my $items = Koha::Items->({ onloan => { '!=' => undef } });
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;