Bug 21284: (QA follow-up) Rename itemonhold and recordonhold
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
d1d5811279
commit
37c8cf6e34
|
|
@ -531,10 +531,10 @@ sub GetPatronInfo {
|
|||
delete $issue->{'more_subfields_xml'};
|
||||
|
||||
# Is the item already on hold by another user?
|
||||
$issue->{'itemonhold'} = Koha::Holds->search({ itemnumber => $issue->{'itemnumber'} })->count;
|
||||
$issue->{'holds_on_item'} = Koha::Holds->search({ itemnumber => $issue->{'itemnumber'} })->count;
|
||||
|
||||
# Is the record (next available item) on hold by another user?
|
||||
$issue->{'recordonhold'} = Koha::Holds->search({ biblionumber => $issue->{'biblionumber'} })->count;
|
||||
$issue->{'holds_on_record'} = Koha::Holds->search({ biblionumber => $issue->{'biblionumber'} })->count;
|
||||
|
||||
push @checkouts, $issue
|
||||
}
|
||||
|
|
|
|||
|
|
@ -650,8 +650,8 @@
|
|||
<location>Salle de lecture</location>
|
||||
<itemlost>0</itemlost>
|
||||
<publicationyear>1985</publicationyear>
|
||||
<recordonhold>0</recordonhold>
|
||||
<itemonhold>0</itemonhold>
|
||||
<holds_on_record>0</holds_on_record>
|
||||
<holds_on_item>0</holds_on_item>
|
||||
<issues>1</issues>
|
||||
<homebranch>BIB</homebranch>
|
||||
<holdingbranch>BIB</holdingbranch>
|
||||
|
|
@ -690,8 +690,8 @@
|
|||
<location>Salle de lecture</location>
|
||||
<itemlost>0</itemlost>
|
||||
<publicationyear>2007</publicationyear>
|
||||
<recordonhold>1</recordonhold>
|
||||
<itemonhold>1</itemonhold>
|
||||
<holds_on_record>1</holds_on_record>
|
||||
<holds_on_item>1</holds_on_item>
|
||||
<issues>1</issues>
|
||||
<homebranch>BIB</homebranch>
|
||||
<holdingbranch>BIB</holdingbranch>
|
||||
|
|
|
|||
|
|
@ -179,8 +179,8 @@ subtest 'GetPatronInfo test for holds' => sub {
|
|||
my $reply = C4::ILSDI::Services::GetPatronInfo( $query );
|
||||
|
||||
# Check that this loan is not on hold
|
||||
is ( $reply->{loans}->{loan}[0]->{recordonhold}, "0", "Record is not on hold");
|
||||
is ( $reply->{loans}->{loan}[0]->{itemonhold}, "0", "Item is not on hold");
|
||||
is ( $reply->{loans}->{loan}[0]->{holds_on_record}, "0", "Record is not on hold");
|
||||
is ( $reply->{loans}->{loan}[0]->{holds_on_item}, "0", "Item is not on hold");
|
||||
|
||||
# Place a loan
|
||||
# Add a hold on the biblio
|
||||
|
|
@ -188,8 +188,8 @@ subtest 'GetPatronInfo test for holds' => sub {
|
|||
|
||||
# Check that it is on hold on biblio level
|
||||
$reply = C4::ILSDI::Services::GetPatronInfo( $query );
|
||||
is ( $reply->{loans}->{loan}[0]->{recordonhold}, "1", "Record is on hold");
|
||||
is ( $reply->{loans}->{loan}[0]->{itemonhold}, "0", "Item is on hold");
|
||||
is ( $reply->{loans}->{loan}[0]->{holds_on_record}, "1", "Record is on hold");
|
||||
is ( $reply->{loans}->{loan}[0]->{holds_on_item}, "0", "Item is on hold");
|
||||
|
||||
# Delete holds
|
||||
$schema->resultset( 'Reserve' )->delete_all;
|
||||
|
|
@ -204,16 +204,16 @@ subtest 'GetPatronInfo test for holds' => sub {
|
|||
|
||||
# When a specific item has a reserve, the item is on hold as well as the record
|
||||
$reply = C4::ILSDI::Services::GetPatronInfo( $query );
|
||||
is ( $reply->{loans}->{loan}[0]->{recordonhold}, "1", "Record is on hold");
|
||||
is ( $reply->{loans}->{loan}[0]->{itemonhold}, "1", "Item is on hold");
|
||||
is ( $reply->{loans}->{loan}[0]->{holds_on_record}, "1", "Record is on hold");
|
||||
is ( $reply->{loans}->{loan}[0]->{holds_on_item}, "1", "Item is on hold");
|
||||
|
||||
# Add another hold on the biblio
|
||||
$biblioreserve = AddReserve({ branchcode => $library->branchcode, borrowernumber => $brwr3->borrowernumber, biblionumber => $biblio->biblionumber });
|
||||
|
||||
# Check that there are 2 holds on the biblio and 1 on this specific item
|
||||
$reply = C4::ILSDI::Services::GetPatronInfo( $query );
|
||||
is ( $reply->{loans}->{loan}[0]->{recordonhold}, "2", "Record is on hold twice");
|
||||
is ( $reply->{loans}->{loan}[0]->{itemonhold}, "1", "Item is on hold");
|
||||
is ( $reply->{loans}->{loan}[0]->{holds_on_record}, "2", "Record is on hold twice");
|
||||
is ( $reply->{loans}->{loan}[0]->{holds_on_item}, "1", "Item is on hold");
|
||||
|
||||
# Cleanup
|
||||
$schema->storage->txn_rollback;
|
||||
|
|
|
|||
Loading…
Reference in New Issue