Bug 28136

Summary: Transferred holds are not triggering
Product: Koha Reporter: Nick Clemens <nick>
Component: CirculationAssignee: Nick Clemens <nick>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: major    
Priority: P5 - low CC: andrewfh, fridolin.somers, gmcharlt, janet.mcgowan, jonathan.druart, joonas.kylmala, kyle.m.hall, martin.renvoize, sally.healey
Version: MainKeywords: rel_20_11_candidate
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
21.05.00,20.11.05
Bug Depends on: 25690    
Bug Blocks: 28139    
Attachments: Bug 28136: Handle Transferred status for ResFound
Bug 28136: Handle Transferred status for ResFound
Bug 28136: Handle Transferred status for ResFound

Description Nick Clemens 2021-04-12 14:16:57 UTC
To test:
1 - Place a hold on an item at Branch B for pickup at Branch A
2 - Check in the item at Branch B - confirm hold and transfer
3 - Check in the item at Branch A - nothing happens?
Comment 1 Nick Clemens 2021-04-12 14:18:09 UTC
bug 25690 added a new status for ResFound return value in CheckReserves

This value is not handled in circ/returns.pl
Comment 2 Nick Clemens 2021-04-12 14:21:23 UTC
Created attachment 119456 [details] [review]
Bug 28136: Handle Transferred status for ResFound

bug 25690 added a new 'Transferred' status to 'ResFound', this status
needs to be handled in circ/returns.pl

To test:
1 - Place a hold on an item at Branch B for pickup at Branch A
2 - Check in the item at Branch B - confirm hold and transfer
3 - Check in the item at Branch A - nothing happens?
4 - Apply patch
5 - Checkin in the item at Branch A - hold popup appears
6 - Clear the hold and place it again
7 - Set system preference 'HoldsAutoFill' to do
8 - Check in the item at Branch B - hold is found and confirmed
9 - Check in the item at Branch A - hold is found and confirmed
Comment 3 Joonas Kylmälä 2021-04-13 08:20:36 UTC
Created attachment 119508 [details] [review]
Bug 28136: Handle Transferred status for ResFound

bug 25690 added a new 'Transferred' status to 'ResFound', this status
needs to be handled in circ/returns.pl

To test:
1 - Place a hold on an item at Branch B for pickup at Branch A
2 - Check in the item at Branch B - confirm hold and transfer
3 - Check in the item at Branch A - nothing happens?
4 - Apply patch
5 - Checkin in the item at Branch A - hold popup appears
6 - Clear the hold and place it again
7 - Set system preference 'HoldsAutoFill' to do
8 - Check in the item at Branch B - hold is found and confirmed
9 - Check in the item at Branch A - hold is found and confirmed

Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Comment 4 Joonas Kylmälä 2021-04-13 08:21:37 UTC
Thanks Nick. I noticed same bug with the Processing state, I will file separate bug for it and also refactor this code here so that similar bug will not happen in the future if C4::Reserves::CheckReserves return values change.
Comment 5 Martin Renvoize 2021-04-14 13:44:30 UTC
Created attachment 119577 [details] [review]
Bug 28136: Handle Transferred status for ResFound

bug 25690 added a new 'Transferred' status to 'ResFound', this status
needs to be handled in circ/returns.pl

To test:
1 - Place a hold on an item at Branch B for pickup at Branch A
2 - Check in the item at Branch B - confirm hold and transfer
3 - Check in the item at Branch A - nothing happens?
4 - Apply patch
5 - Checkin in the item at Branch A - hold popup appears
6 - Clear the hold and place it again
7 - Set system preference 'HoldsAutoFill' to do
8 - Check in the item at Branch B - hold is found and confirmed
9 - Check in the item at Branch A - hold is found and confirmed

Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 6 Martin Renvoize 2021-04-14 13:45:47 UTC
We just got bitten by this one too..

Works as expected, passes QA scripts, Passing QA.

I look forward to some promised refactoring/will happily lend a hand to that refactoring effort... this code is spaghetti that we're slowly getting to unpick :)
Comment 7 Jonathan Druart 2021-04-14 14:07:21 UTC
Pushed to master for 21.05, thanks to everybody involved!
Comment 8 Joonas Kylmälä 2021-04-14 14:20:26 UTC
(In reply to Martin Renvoize from comment #6)
> I look forward to some promised refactoring/will happily lend a hand to that
> refactoring effort... this code is spaghetti that we're slowly getting to
> unpick :)

The refactoring is waiting already for sign-off in bug 28139. :)
Comment 9 Martin Renvoize 2021-04-14 14:51:23 UTC
(In reply to Joonas Kylmälä from comment #8)
> (In reply to Martin Renvoize from comment #6)
> > I look forward to some promised refactoring/will happily lend a hand to that
> > refactoring effort... this code is spaghetti that we're slowly getting to
> > unpick :)
> 
> The refactoring is waiting already for sign-off in bug 28139. :)

Excellent.. that's just hit the next item in my list then :)
Comment 10 Fridolin Somers 2021-04-19 13:13:17 UTC
Pushed to 20.11.x for 20.11.05
Comment 11 Andrew Fuerste-Henry 2021-04-25 15:20:07 UTC
Missing dependency (bug 25690), not backported to 20.05