Bug 24705: Holds placed via SIP will be given first priority

The SIP server does not calculate and pass a priority to AddReserve, which causes the hold to be given priority 1.

Test Plan:
1) Place a hold via SIP for a record with existing holds
2) Note the new hold is top priority
3) Apply this patch
4) Restart SIP
5) Repeat step 1
6) New hold should be last priority

Signed-off-by: Christofer Zorn <Christofer.Zorn@ajaxlibrary.ca>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
This commit is contained in:
Kyle M Hall 2020-02-21 09:41:27 -05:00 committed by Joy Nelson
parent 8c8053d9e7
commit e41f2c9824
1 changed files with 2 additions and 1 deletions

View File

@ -66,7 +66,8 @@ sub do_hold {
return $self;
}
AddReserve( $branch, $patron->borrowernumber, $item->biblionumber );
my $priority = C4::Reserves::CalculatePriority($item->biblionumber);
AddReserve( $branch, $patron->borrowernumber, $item->biblionumber, undef, $priority );
# unfortunately no meaningful return value
$self->ok(1);