]> git.koha-community.org Git - koha.git/commit
Bug 23070: Use Koha::Hold in C4::Reserves::RevertWaitingStatus
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 6 Jun 2019 20:14:28 +0000 (15:14 -0500)
committerLucas Gass <lucas@bywatersolutions.com>
Mon, 27 Jul 2020 15:46:53 +0000 (15:46 +0000)
commite58362b16a103b6bc215626ec77f908c1b7e55c8
tree4f0ef6c80a8df2a27d3e9a7a85867ee5177b37f5
parentffa38dae12c0c9a6b2f24589d1d581b2e3dfb10b
Bug 23070: Use Koha::Hold in C4::Reserves::RevertWaitingStatus

We are using raw SQL statements, we should use Koha::Hold instead.

This patch does not seem optimal, we would like to increment priority in
only 1 statement and without the need to fetch and loop all holds.

== Test plan ==
- apply patch
- place some holds on the same record
- check that the priorities look good
- mark one hold as waiting by doing a check-in
- revert the waiting status
- confirm that the priorities are recalculated correctly

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 563a25d952ee571eb1d626f97eef001c5f646b1f)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
C4/Reserves.pm