Bug 18256

Summary: Koha::Biblio - Remove GetItemsCount
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: brendan, veron
Version: unspecified   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on:    
Bug Blocks: 17628, 18259, 18260, 18467, 19596    
Attachments: Bug 18256: Koha::Items - Remove GetItemsCount
Bug 18256: Koha::Items - Remove GetItemsCount
Bug 18256: Koha::Items - Remove GetItemsCount
Bug 18256: Koha::Items - Remove GetItemsCount
Bug 18256: Koha::Items - Remove GetItemsCount
Bug 18256: Koha::Items - Remove GetItemsCount

Description Jonathan Druart 2017-03-13 17:39:22 UTC

    
Comment 1 Jonathan Druart 2017-03-13 17:45:12 UTC
Created attachment 61048 [details] [review]
Bug 18256: Koha::Items - Remove GetItemsCount

C4::Items::GetItemsCount can be replaced with Koha::Biblio->items->count

Test plan:
Create a bibliographic record with items attached
Try to delete the record from a basket (acquisition module), the detail
page and the batch item deletion tool.

=> You should not be able to delete it.

Remove the items and then try again to delete the record

=> Now you must be able to delete it.
Comment 2 Jonathan Druart 2017-03-13 17:48:19 UTC
Created attachment 61049 [details] [review]
Bug 18256: Koha::Items - Remove GetItemsCount

C4::Items::GetItemsCount can be replaced with Koha::Biblio->items->count

Test plan:
Create a bibliographic record with items attached
Try to delete the record from a basket (acquisition module), the detail
page and the batch item deletion tool.

=> You should not be able to delete it.

Remove the items and then try again to delete the record

=> Now you must be able to delete it.
Comment 3 Jonathan Druart 2017-03-13 19:29:34 UTC
Created attachment 61052 [details] [review]
Bug 18256: Koha::Items - Remove GetItemsCount

C4::Items::GetItemsCount can be replaced with Koha::Biblio->items->count

Test plan:
Create a bibliographic record with items attached
Try to delete the record from a basket (acquisition module), the detail
page and the batch item deletion tool.

=> You should not be able to delete it.

Remove the items and then try again to delete the record

=> Now you must be able to delete it.
Comment 4 Marc Véron 2017-03-15 16:41:23 UTC
Wanted to test but can not apply: sha1 information is lacking or useless(C4/Acquisition.pm)
Missing dependency?
Comment 5 Jonathan Druart 2017-03-15 18:59:19 UTC
Created attachment 61119 [details] [review]
Bug 18256: Koha::Items - Remove GetItemsCount

C4::Items::GetItemsCount can be replaced with Koha::Biblio->items->count

Test plan:
Create a bibliographic record with items attached
Try to delete the record from a basket (acquisition module), the detail
page and the batch item deletion tool.

=> You should not be able to delete it.

Remove the items and then try again to delete the record

=> Now you must be able to delete it.
Comment 6 Jonathan Druart 2017-03-15 18:59:44 UTC
(In reply to Marc Véron from comment #4)
> Wanted to test but can not apply: sha1 information is lacking or
> useless(C4/Acquisition.pm)
> Missing dependency?

Looks ok for me, reattached it.
Comment 7 Marc Véron 2017-03-15 19:23:39 UTC
Created attachment 61120 [details] [review]
Bug 18256: Koha::Items - Remove GetItemsCount

C4::Items::GetItemsCount can be replaced with Koha::Biblio->items->count

Test plan:
Create a bibliographic record with items attached
Try to delete the record from a basket (acquisition module), the detail
page and the batch item deletion tool.

=> You should not be able to delete it.

Remove the items and then try again to delete the record

=> Now you must be able to delete it.

Followed test plan, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Comment 8 Nick Clemens (kidclamp) 2017-03-20 10:42:19 UTC
Created attachment 61259 [details] [review]
Bug 18256: Koha::Items - Remove GetItemsCount

C4::Items::GetItemsCount can be replaced with Koha::Biblio->items->count

Test plan:
Create a bibliographic record with items attached
Try to delete the record from a basket (acquisition module), the detail
page and the batch item deletion tool.

=> You should not be able to delete it.

Remove the items and then try again to delete the record

=> Now you must be able to delete it.

Followed test plan, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 9 Brendan Gallagher 2017-03-23 10:21:20 UTC
Pushed to Master - Should be in the 17.05 release.  Thanks!
Comment 10 Katrin Fischer 2017-03-26 20:47:45 UTC
Looks more like an enhancement :)

This won't get ported back to 16.11.x as it is an enhancement.