Bug 18256 - Koha::Biblio - Remove GetItemsCount
Summary: Koha::Biblio - Remove GetItemsCount
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 17628 18259 18260 18467 19596
  Show dependency treegraph
 
Reported: 2017-03-13 17:39 UTC by Jonathan Druart
Modified: 2018-06-04 20:10 UTC (History)
2 users (show)

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


Attachments
Bug 18256: Koha::Items - Remove GetItemsCount (12.58 KB, patch)
2017-03-13 17:45 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 18256: Koha::Items - Remove GetItemsCount (12.67 KB, patch)
2017-03-13 17:48 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 18256: Koha::Items - Remove GetItemsCount (12.69 KB, patch)
2017-03-13 19:29 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 18256: Koha::Items - Remove GetItemsCount (12.68 KB, patch)
2017-03-15 18:59 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 18256: Koha::Items - Remove GetItemsCount (12.85 KB, patch)
2017-03-15 19:23 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 18256: Koha::Items - Remove GetItemsCount (12.90 KB, patch)
2017-03-20 10:42 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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.