Bug 37480

Summary: Make C4::Serials::addroutingmember use Koha::Objects
Product: Koha Reporter: Tomás Cohen Arazi (tcohen) <tomascohen>
Component: Architecture, internals, and plumbingAssignee: Tomás Cohen Arazi (tcohen) <tomascohen>
Status: Needs documenting --- QA Contact: Jonathan Druart <jonathan.druart>
Severity: enhancement    
Priority: P5 - low CC: jonathan.druart, lucas, tomascohen
Version: MainKeywords: release-notes-needed
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.11.00
Circulation function:
Bug Depends on: 37476    
Bug Blocks: 37876    
Attachments: Bug 37480: Make addroutingmember use Koha::Subscription::Routinglists
Bug 37480: Make addroutingmember use Koha::Subscription::Routinglists
Bug 37480: Make addroutingmember use Koha::Subscription::Routinglists

Description Tomás Cohen Arazi (tcohen) 2024-07-25 17:31:50 UTC

    
Comment 1 Tomás Cohen Arazi (tcohen) 2024-07-25 17:32:36 UTC
I initially wrote this as part of bug 37476 then decided to move it to it's own place.
Comment 2 Tomás Cohen Arazi (tcohen) 2024-07-25 17:37:31 UTC
Created attachment 169608 [details] [review]
Bug 37480: Make addroutingmember use Koha::Subscription::Routinglists

This patch rewriteis the method so it relies on Koha::Object-based
classes instead of the old way.

To test:
1. Run:
   $ ktd --shell
  k$ prove t/db_dependent/Serials.t
=> SUCCESS: Tests pass!
2. Apply this patch
3. Repeat 1
=> SUCCESS: Tests pass!
4. Run:
   $ git grep addroutingmember
=> SUCCESS: It is only called on a single .pl file which doesn't care
about the return value. Neither the tests care.
5. Sign off :-D
Comment 3 David Nind 2024-07-27 01:28:14 UTC
Created attachment 169796 [details] [review]
Bug 37480: Make addroutingmember use Koha::Subscription::Routinglists

This patch rewriteis the method so it relies on Koha::Object-based
classes instead of the old way.

To test:
1. Run:
   $ ktd --shell
  k$ prove t/db_dependent/Serials.t
=> SUCCESS: Tests pass!
2. Apply this patch
3. Repeat 1
=> SUCCESS: Tests pass!
4. Run:
   $ git grep addroutingmember
=> SUCCESS: It is only called on a single .pl file which doesn't care
about the return value. Neither the tests care.
5. Sign off :-D

Signed-off-by: David Nind <david@davidnind.com>
Comment 4 Jonathan Druart 2024-09-10 07:53:28 UTC
Created attachment 171240 [details] [review]
Bug 37480: Make addroutingmember use Koha::Subscription::Routinglists

This patch rewriteis the method so it relies on Koha::Object-based
classes instead of the old way.

To test:
1. Run:
   $ ktd --shell
  k$ prove t/db_dependent/Serials.t
=> SUCCESS: Tests pass!
2. Apply this patch
3. Repeat 1
=> SUCCESS: Tests pass!
4. Run:
   $ git grep addroutingmember
=> SUCCESS: It is only called on a single .pl file which doesn't care
about the return value. Neither the tests care.
5. Sign off :-D

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 5 Jonathan Druart 2024-09-10 07:53:49 UTC
I've tested the feature. This test plan is cheating :D
Comment 6 Katrin Fischer 2024-09-16 08:46:44 UTC
I agree with Joubu about the cheating with the test plan. *stern look*
Comment 7 Katrin Fischer 2024-09-16 08:54:07 UTC
Pushed for 24.11!

Well done everyone, thank you!
Comment 8 Tomás Cohen Arazi (tcohen) 2024-09-16 17:56:50 UTC
(In reply to Jonathan Druart from comment #5)
> I've tested the feature. This test plan is cheating :D

I forgot about the test plan IMHO.