Bug 15294 - Move the C4::Branch related code to Koha::Libraries - part 1
Summary: Move the C4::Branch related code to Koha::Libraries - part 1
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Target Milestone: ---
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 4941 15293 15295 15586 16015
  Show dependency treegraph
 
Reported: 2015-12-03 15:09 UTC by Jonathan Druart
Modified: 2017-06-14 22:05 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 15294: Koha::Libraries - Move existing Koha::Branch[es] (12.57 KB, patch)
2015-12-03 16:13 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 15294: Koha::Libraries - Rewrite the admin scripts (58.40 KB, patch)
2015-12-03 16:13 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 15294: Koha::Libraries - Rewrite the admin scripts (58.57 KB, patch)
2015-12-17 09:34 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 15294: Koha::Libraries - Move existing Koha::Branch[es] (12.77 KB, patch)
2015-12-17 09:36 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 15294: Koha::Libraries - Rewrite the admin scripts (58.57 KB, patch)
2015-12-17 09:37 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 15294: Koha::Libraries - Move existing Koha::Branch[es] (12.82 KB, patch)
2015-12-23 04:57 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 15294: Koha::Libraries - Rewrite the admin scripts (58.63 KB, patch)
2015-12-23 04:58 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 15294: Koha::Libraries - Move existing Koha::Branch[es] (12.94 KB, patch)
2016-01-04 09:38 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 15294: Koha::Libraries - Rewrite the admin scripts (58.63 KB, patch)
2016-01-04 09:38 UTC, Jonathan Druart
Details | Diff | Splinter Review

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