If you check in Processing hold and have HoldsAutoFill pref enabled the hold is not filled automatically as they should be according to the HoldsAutoFill syspref.
Created attachment 119511 [details] [review] Bug 28139: Handle Processing status with HoldsAutoFill pref turned on To test: 1: Turn on HoldsAutoFill setting 2: Place a item-level hold on item X at Branch A 3: Make the hold to Processing state: $ koha-mysql kohadev > select * from reserves; # look up the reserve_id > UPDATE reserves SET found = 'P', priority = 0 WHERE reserve_id = XXX; 4: Check in the item X at Branch A - A pop-up asking confirmation comes 5: Apply patch & restart plack 6: Check in the item X again at Branch A - now the hold is confirmed automatically
Created attachment 119512 [details] [review] Bug 28139: Simplify logic for handling found holds in returns.pl We are handling in this if-else block 3 cases: - Hold found and waiting - Hold found but not waiting AND whether HoldsAutoFill is enabled - Hold found but not waiting AND whether HoldsAutoFill disabled If we simply first handle hold found = Waiting case first then we don't have to individually list all those other found cases and that simplifies this code a lot. To test: 1. Apply patch 2. Make sure HoldsAutoFill is disabled 3. Make item-level hold on branch A 4. Check-in the item at branch A and you should get pop-up confirming the hold, ignore it 5. Set HoldsAutoFill is enabled 4. Check-in the item again and you now the hold should have been automatically filled
Created attachment 119586 [details] [review] Bug 28139: Handle Processing status with HoldsAutoFill pref turned on To test: 1: Turn on HoldsAutoFill setting 2: Place a item-level hold on item X at Branch A 3: Make the hold to Processing state: $ koha-mysql kohadev > select * from reserves; # look up the reserve_id > UPDATE reserves SET found = 'P', priority = 0 WHERE reserve_id = XXX; 4: Check in the item X at Branch A - A pop-up asking confirmation comes 5: Apply patch & restart plack 6: Check in the item X again at Branch A - now the hold is confirmed automatically Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 119587 [details] [review] Bug 28139: Simplify logic for handling found holds in returns.pl We are handling in this if-else block 3 cases: - Hold found and waiting - Hold found but not waiting AND whether HoldsAutoFill is enabled - Hold found but not waiting AND whether HoldsAutoFill disabled If we simply first handle hold found = Waiting case first then we don't have to individually list all those other found cases and that simplifies this code a lot. To test: 1. Apply patch 2. Make sure HoldsAutoFill is disabled 3. Make item-level hold on branch A 4. Check-in the item at branch A and you should get pop-up confirming the hold, ignore it 5. Set HoldsAutoFill is enabled 4. Check-in the item again and you now the hold should have been automatically filled Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nice work, this makes the code a fair bit clearer and fixes the Processing status as the test plan describes. Signing off, thanks Joonas
Created attachment 119590 [details] [review] Bug 28139: Handle Processing status with HoldsAutoFill pref turned on To test: 1: Turn on HoldsAutoFill setting 2: Place a item-level hold on item X at Branch A 3: Make the hold to Processing state: $ koha-mysql kohadev > select * from reserves; # look up the reserve_id > UPDATE reserves SET found = 'P', priority = 0 WHERE reserve_id = XXX; 4: Check in the item X at Branch A - A pop-up asking confirmation comes 5: Apply patch & restart plack 6: Check in the item X again at Branch A - now the hold is confirmed automatically Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 119591 [details] [review] Bug 28139: Simplify logic for handling found holds in returns.pl We are handling in this if-else block 3 cases: - Hold found and waiting - Hold found but not waiting AND whether HoldsAutoFill is enabled - Hold found but not waiting AND whether HoldsAutoFill disabled If we simply first handle hold found = Waiting case first then we don't have to individually list all those other found cases and that simplifies this code a lot. To test: 1. Apply patch 2. Make sure HoldsAutoFill is disabled 3. Make item-level hold on branch A 4. Check-in the item at branch A and you should get pop-up confirming the hold, ignore it 5. Set HoldsAutoFill is enabled 4. Check-in the item again and you now the hold should have been automatically filled Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Pushed to master for 21.05, thanks to everybody involved!
Pushed to 20.11.x for 20.11.06
Missing dependency, not backported to 20.05