Bug 12086 - Hold priorities incorrect, when waiting status was reversed
authorKyle M Hall <kyle@bywatersolutions.com>
Thu, 17 Apr 2014 16:10:21 +0000 (12:10 -0400)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Mon, 23 Jun 2014 18:07:11 +0000 (15:07 -0300)
commit0f6ff541047c0afa83077e0e8d0d0860e6a4ffd7
tree09555c04bdc8778b2f9b8eb566de6a0cbc968645
parent8599b1dc5d4bf48261d22fa8db553351e978d0b5
Bug 12086 - Hold priorities incorrect, when waiting status was reversed

1) Test record has 1 single item, checked out to patron X
2) Place 3 holds for patrons A, B and C, all title level hold this time
   A, B, C, item branches and staff branch are the same.
3) Return item, confirm hold
4) Confirm item is now waiting for patron A
   Priorities are: A = Waiting, B = 1, C = 2
5) Open patron account of user B, checkout book
   Koha asks: Item X has been waiting for patron A... Revert
   waiting status
   Confirm.
6) Check priorities:
   Hold list shows: A = 1, C = 1
   Database says: A = 1, C = 3
7) Apply this patch
8) Repeat steps 1-6
9) Note the priorities are correct

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Test plan correctly predicts the error and the correction made by the
patch.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
C4/Reserves.pm
t/db_dependent/Holds/RevertWaitingStatus.t [new file with mode: 0755]