# (Bug 24683):
my $biblio2 = $builder->build_sample_biblio( { itemtype => $itemtype } );
- my $biblionumber1 = $biblio2->biblionumber;
my $item4 = $builder->build_sample_item(
- { biblionumber => $biblionumber1,
+ { biblionumber => $biblio2->biblionumber,
itype => $itemtype,
homebranch => $library_A,
holdingbranch => $library_A
}
);
my $item5 = $builder->build_sample_item(
- { biblionumber => $biblionumber1,
+ { biblionumber => $biblio2->biblionumber,
itype => $itemtype2,
homebranch => $library_A,
holdingbranch => $library_A
}
);
- $is = ItemsAnyAvailableAndNotRestricted( { biblionumber => $biblionumber1, patron => $patron1 } );
+ $is = ItemsAnyAvailableAndNotRestricted( { biblionumber => $biblio2->biblionumber, patron => $patron1 } );
is( $is, 1, "Items availability: 2 items, one allowed by smart rule but not checked out, another one not allowed to be held by smart rule" );
$is = IsAvailableForItemLevelRequest( $item4, $patron1 );
AddIssue( $patron2->unblessed, $item4->barcode );
- $is = ItemsAnyAvailableAndNotRestricted( { biblionumber => $biblionumber1, patron => $patron1 } );
+ $is = ItemsAnyAvailableAndNotRestricted( { biblionumber => $biblio2->biblionumber, patron => $patron1 } );
is( $is, 0, "Items availability: 2 items, one allowed by smart rule and checked out, another one not allowed to be held by smart rule" );
$is = IsAvailableForItemLevelRequest( $item4, $patron1 );
plan tests => 1;
my $biblio2 = $builder->build_sample_biblio( { itemtype => $itemtype } );
- my $biblionumber1 = $biblio2->biblionumber;
my $item1 = $builder->build_sample_item(
- { biblionumber => $biblionumber1,
+ { biblionumber => $biblio2->biblionumber,
itype => $itemtype2,
homebranch => $library_A,
holdingbranch => $library_A,
}
);
- $is = ItemsAnyAvailableAndNotRestricted( { biblionumber => $biblionumber1, patron => $patron1 } );
+ $is = ItemsAnyAvailableAndNotRestricted( { biblionumber => $biblio2->biblionumber, patron => $patron1 } );
is( $is, 0, "Ordered item cannot be checked out" );
};