Bug 19299

Summary: Replace C4::Reserves::GetReservesForBranch with Koha::Holds->waiting
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: Architecture, internals, and plumbingAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: m.de.rooy, nick
Version: unspecified   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on:    
Bug Blocks: 17728    
Attachments: Bug 19299: Replace C4::Reserves::GetReservesForBranch with Koha::Holds->waiting
Bug 19299: Replace C4::Reserves::GetReservesForBranch with Koha::Holds->waiting
Bug 19299: Replace C4::Reserves::GetReservesForBranch with Koha::Holds->waiting
Bug 19299: Replace C4::Reserves::GetReservesForBranch with Koha::Holds->waiting

Description Jonathan Druart 2017-09-12 21:33:48 UTC

    
Comment 1 Jonathan Druart 2017-09-13 18:56:16 UTC
Created attachment 67117 [details] [review]
Bug 19299: Replace C4::Reserves::GetReservesForBranch with Koha::Holds->waiting

GetReservesForBranch simply returns the waiting holds, for a specific
branch of not. This can easily be replaced with a call to
Koha::Holds->waiting

To avoid any regressions, I reuse the exact conditions (priority = 0),
but I do not think it is useful.

Test plan:
Make sure the holds information are correctly displayed on the waiting
holds screen.
Comment 2 Jonathan Druart 2017-09-13 19:20:39 UTC
Created attachment 67118 [details] [review]
Bug 19299: Replace C4::Reserves::GetReservesForBranch with Koha::Holds->waiting

GetReservesForBranch simply returns the waiting holds, for a specific
branch of not. This can easily be replaced with a call to
Koha::Holds->waiting

To avoid any regressions, I reuse the exact conditions (priority = 0),
but I do not think it is useful.

Test plan:
Make sure the holds information are correctly displayed on the waiting
holds screen.
Comment 3 Josef Moravec 2017-10-29 21:47:45 UTC
Created attachment 68815 [details] [review]
Bug 19299: Replace C4::Reserves::GetReservesForBranch with Koha::Holds->waiting

GetReservesForBranch simply returns the waiting holds, for a specific
branch of not. This can easily be replaced with a call to
Koha::Holds->waiting

To avoid any regressions, I reuse the exact conditions (priority = 0),
but I do not think it is useful.

Test plan:
Make sure the holds information are correctly displayed on the waiting
holds screen.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 4 Marcel de Rooy 2017-11-03 08:27:32 UTC
+# FIXME - Is priority => 0 useful? If yes it must be moved to waiting, otherwise we need to remove it from here.

Since set_waiting sets priority to 0, we should not need to check priority again. But the test has been used more often in that way:
return 'Waiting'  if $found eq 'W' and $priority == 0;

IF found is W or T, priority should be 0. Priority is no longer of importance when an item has been set to Waiting.
Comment 5 Marcel de Rooy 2017-11-03 08:28:21 UTC
Created attachment 68908 [details] [review]
Bug 19299: Replace C4::Reserves::GetReservesForBranch with Koha::Holds->waiting

GetReservesForBranch simply returns the waiting holds, for a specific
branch of not. This can easily be replaced with a call to
Koha::Holds->waiting

To avoid any regressions, I reuse the exact conditions (priority = 0),
but I do not think it is useful.

Test plan:
Make sure the holds information are correctly displayed on the waiting
holds screen.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 6 Jonathan Druart 2017-12-11 14:35:38 UTC
Pushed to master for 18.05, thanks to everybody involved!
Comment 7 Nick Clemens (kidclamp) 2017-12-14 17:45:03 UTC
Awesome work all! Skipping for 17.11, enhancement.