Bug 15294

Summary: Move the C4::Branch related code to Koha::Libraries - part 1
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, martin.renvoize, veron
Version: Main   
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:    
Bug Blocks: 4941, 15293, 15295, 15586, 16015    
Attachments: Bug 15294: Koha::Libraries - Move existing Koha::Branch[es]
Bug 15294: Koha::Libraries - Rewrite the admin scripts
Bug 15294: Koha::Libraries - Rewrite the admin scripts
Bug 15294: Koha::Libraries - Move existing Koha::Branch[es]
Bug 15294: Koha::Libraries - Rewrite the admin scripts
Bug 15294: Koha::Libraries - Move existing Koha::Branch[es]
Bug 15294: Koha::Libraries - Rewrite the admin scripts
Bug 15294: Koha::Libraries - Move existing Koha::Branch[es]
Bug 15294: Koha::Libraries - Rewrite the admin scripts

Description Jonathan Druart 2015-12-03 15:09:46 UTC
This first part will include:
- move Koha::Branch[es] to Koha::Librar[y|ies]
- use Koha::Libraries from admin/branches.pl
Comment 1 Jonathan Druart 2015-12-03 16:13:36 UTC Comment hidden (obsolete)
Comment 2 Jonathan Druart 2015-12-03 16:13:55 UTC Comment hidden (obsolete)
Comment 3 Marc Véron 2015-12-17 09:34:16 UTC Comment hidden (obsolete)
Comment 4 Marc Véron 2015-12-17 09:36:33 UTC Comment hidden (obsolete)
Comment 5 Marc Véron 2015-12-17 09:37:25 UTC Comment hidden (obsolete)
Comment 6 Martin Renvoize 2015-12-23 04:57:11 UTC Comment hidden (obsolete)
Comment 7 Martin Renvoize 2015-12-23 04:58:52 UTC Comment hidden (obsolete)
Comment 8 Martin Renvoize 2015-12-23 04:59:52 UTC
Much needed architectural work, which I can't find any regressions in. Passing QA, well done Jonathan.
Comment 9 Brendan Gallagher 2015-12-31 19:18:12 UTC
Didn't apply cleanly for me - can you rebase this Jonathan?  (ping me when you've rebased so I can test it and push it).

Thanks!
Comment 10 Jonathan Druart 2016-01-04 09:38:02 UTC
Created attachment 46219 [details] [review]
Bug 15294: Koha::Libraries - Move existing Koha::Branch[es]

There was already 2 Koha::Branch[es] using Koha::Object[s] before.
For this new rewrite, it seems preferable to start with good basis and
name the new modules Koha::Library and Koha::Libraries.

Tested both patches together, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 11 Jonathan Druart 2016-01-04 09:38:07 UTC
Created attachment 46220 [details] [review]
Bug 15294: Koha::Libraries - Rewrite the admin scripts

This patch rewrites the admin/branches.pl script to use the new modules
instead of C4::Branches.

Test plan:
1/ Create libraries using all the fields available
2/ Create groups of libraries
3/ Assign 1+ libraries to some groups
4/ Delete libraries and groups of libraries
You should not able to delete a library if items or patrons use it.
You should not able to delete a group of libraries if there are still
libraries using it.
5/ Update libraries and groups of libraries

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

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 12 Jonathan Druart 2016-01-04 09:40:05 UTC
(In reply to Brendan Gallagher from comment #9)
> Didn't apply cleanly for me - can you rebase this Jonathan?  (ping me when
> you've rebased so I can test it and push it).
> 
> Thanks!

Trivial conflicts with bug 15373, bug 13517 and bug 13853 fixed.
Comment 13 Brendan Gallagher 2016-01-14 15:34:34 UTC
Pushed to Master - Should be in the May 2016 release