Bug 19056

Summary: Move C4::Reserves::GetReserveCount to the Koha namespace
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: Architecture, internals, and plumbingAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Julian Maurice <julian.maurice>
Severity: enhancement    
Priority: P5 - low CC: fridolin.somers, julian.maurice, veron
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 19055    
Bug Blocks: 17728, 19057    
Attachments: Bug 19056: Replace C4::Reserves::GetReserveCount with Koha::Patron->holds->count
Bug 19056: Replace C4::Reserves::GetReserveCount with Koha::Patron->holds->count
Bug 19056: Replace C4::Reserves::GetReserveCount with Koha::Patron->holds->count

Description Jonathan Druart 2017-08-07 20:42:12 UTC
C4::Reserves::GetReserveCount can easily be replaced with Koha::Patron->holds->count
Comment 1 Jonathan Druart 2017-08-07 20:54:19 UTC
Created attachment 65604 [details] [review]
Bug 19056: Replace C4::Reserves::GetReserveCount with Koha::Patron->holds->count

This subroutine is only used once and can easily be replaced with
Koha::Patron->holds->count

Test plan:
- Set maxreserves=5
- Place 3 holds for a given patron
- Place again 3 holds for this patron
3+3 > 5 => The holds must not be placed
Comment 2 Marc Véron 2017-08-08 08:31:10 UTC
Created attachment 65617 [details] [review]
Bug 19056: Replace C4::Reserves::GetReserveCount with Koha::Patron->holds->count

This subroutine is only used once and can easily be replaced with
Koha::Patron->holds->count

Test plan:
- Set maxreserves=5
- Place 3 holds for a given patron
- Place again 3 holds for this patron
3+3 > 5 => The holds must not be placed

Signed-off-by: Marc Véron <veron@veron.ch>
Comment 3 Julian Maurice 2017-09-01 09:52:58 UTC
Created attachment 66696 [details] [review]
Bug 19056: Replace C4::Reserves::GetReserveCount with Koha::Patron->holds->count

This subroutine is only used once and can easily be replaced with
Koha::Patron->holds->count

Test plan:
- Set maxreserves=5
- Place 3 holds for a given patron
- Place again 3 holds for this patron
3+3 > 5 => The holds must not be placed

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Comment 4 Jonathan Druart 2017-09-01 16:08:01 UTC
Pushed to master for 17.11, thanks to everybody involved!
Comment 5 Fridolin Somers 2017-10-03 08:11:30 UTC
Isn't this enhancement ?
Comment 6 Jonathan Druart 2017-10-03 13:50:18 UTC
(In reply to Fridolin SOMERS from comment #5)
> Isn't this enhancement ?

Changed to enhancement.