Bug 30580 - GetItemsAvailableToFillHoldRequestsForBib should get transfers during initial query
Summary: GetItemsAvailableToFillHoldRequestsForBib should get transfers during initial...
Status: RESOLVED DUPLICATE of bug 24295
Alias: None
Product: Koha
Classification: Unclassified
Component: Hold requests (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Nick Clemens
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-04-21 13:20 UTC by Nick Clemens
Modified: 2023-05-18 11:06 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 30580: Don't use GetTransfers in GetItemsAvailableToFillHoldRequestsForBib (2.35 KB, patch)
2022-04-21 13:22 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 30580: Don't use GetTransfers in GetItemsAvailableToFillHoldRequestsForBib (2.47 KB, patch)
2022-06-30 21:34 UTC, Michal Urban
Details | Diff | Splinter Review
Bug 30580: Unit test (1.62 KB, patch)
2022-08-15 13:53 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 30580: Don't use GetTransfers in GetItemsAvailableToFillHoldRequestsForBib (3.08 KB, patch)
2022-08-15 13:53 UTC, Nick Clemens
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens 2022-04-21 13:20:31 UTC
Currently we get the items, then loop over them checking for transfers - we can simply join to branch transfers in the initial query
Comment 1 Nick Clemens 2022-04-21 13:22:30 UTC
Created attachment 133560 [details] [review]
Bug 30580: Don't use GetTransfers in GetItemsAvailableToFillHoldRequestsForBib

This patch simply moves the check for transfers into the initial query

To test:
1 - Place some holds that show in the holds queue
2 - Add a manual transfer to one item
3 - Confirm it no longer hsows in the queue
4 - Apply patch
5 - Confirm item still does not appear in the queue
Comment 2 Michal Urban 2022-06-30 21:34:19 UTC
Created attachment 136797 [details] [review]
Bug 30580: Don't use GetTransfers in GetItemsAvailableToFillHoldRequestsForBib

This patch simply moves the check for transfers into the initial query

Test result: Works as intended

To test:
1 - Place some holds that show in the holds queue
2 - Add a manual transfer to one item
3 - Confirm it no longer hsows in the queue
4 - Apply patch
5 - Confirm item still does not appear in the queue

Signed-off-by: Michal Urban <michalurban177@gmail.com>
Comment 3 Fridolin Somers 2022-08-13 06:47:01 UTC
Arf method GetItemsAvailableToFillHoldRequestsForBib does not have a unit test yet.
Please create one.
It will ensure this change is harmless.
Comment 4 Katrin Fischer 2022-08-13 20:05:49 UTC
Setting to Failed QA to make this show on Nick's radar :)
Comment 5 Nick Clemens 2022-08-15 13:53:16 UTC
Created attachment 139129 [details] [review]
Bug 30580: Unit test
Comment 6 Nick Clemens 2022-08-15 13:53:19 UTC
Created attachment 139130 [details] [review]
Bug 30580: Don't use GetTransfers in GetItemsAvailableToFillHoldRequestsForBib

This patch simply moves the check for transfers into the initial query

To test:
1 - Place some holds that show in the holds queue
2 - Add a manual transfer to one item
3 - Confirm it no longer hsows in the queue
4 - Apply patch
5 - Confirm item still does not appear in the queue
Comment 7 Joonas Kylmälä 2022-08-21 20:02:53 UTC
This appears to be duplicate of bug 24295. Nick, could you attach the unit test you made here to bug 24295 as it doesn't have it? A QA round would be nice as well, so we could get the patches pushed on the same go :)

*** This bug has been marked as a duplicate of bug 24295 ***