Bug 28588

Summary: Add Koha::Checkouts::ReturnClaim->resolve
Product: Koha Reporter: Tomás Cohen Arazi (tcohen) <tomascohen>
Component: Architecture, internals, and plumbingAssignee: Tomás Cohen Arazi (tcohen) <tomascohen>
Status: CLOSED FIXED QA Contact: Kyle M Hall (khall) <kyle>
Severity: enhancement    
Priority: P5 - low CC: andrew, jonathan.druart, kyle, martin.renvoize
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:
21.11.00
Circulation function:
Bug Depends on: 28271    
Bug Blocks: 28593, 28595    
Attachments: Bug 28588: Unit tests
Bug 28588: Add Koha::Checkouts::ReturnClaim->resolve
Bug 28588: (follow-up) Make the API use the new method
Bug 28588: Unit tests
Bug 28588: Add Koha::Checkouts::ReturnClaim->resolve
Bug 28588: (follow-up) Make the API use the new method
Bug 28588: Unit tests
Bug 28588: Add Koha::Checkouts::ReturnClaim->resolve
Bug 28588: (follow-up) Make the API use the new method

Description Tomás Cohen Arazi (tcohen) 2021-06-17 19:16:29 UTC
Right now it is all solved in the controller. We need some low-level implementation that could be reused (cronjobs?)
Comment 1 Tomás Cohen Arazi (tcohen) 2021-06-18 19:39:01 UTC
Created attachment 122174 [details] [review]
Bug 28588: Unit tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 2 Tomás Cohen Arazi (tcohen) 2021-06-18 19:39:05 UTC
Created attachment 122175 [details] [review]
Bug 28588: Add Koha::Checkouts::ReturnClaim->resolve

This patch introduces a high-level method for resolving claims.
The behavior intends to replace the code in the API controller that is
used for resolving a claim.

To test:
1. Apply this patches
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Checkouts/ReturnClaim.t
=> SUCCESS: Tests pass
3. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 3 Tomás Cohen Arazi (tcohen) 2021-06-18 19:39:09 UTC
Created attachment 122176 [details] [review]
Bug 28588: (follow-up) Make the API use the new method

This patch adapts the controller method for resolving a return claim so
it uses the Koha::Checkouts::ReturnClaim method instead.

To test:
1. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/return_claims.t
=> SUCCESS: Tests pass!
2. Apply this patch
3. Repeat 1
=> SUCCESS: Tests pass!
4. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 4 David Nind 2021-06-18 20:16:16 UTC
Created attachment 122179 [details] [review]
Bug 28588: Unit tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: David Nind <david@davidnind.com>
Comment 5 David Nind 2021-06-18 20:16:20 UTC
Created attachment 122180 [details] [review]
Bug 28588: Add Koha::Checkouts::ReturnClaim->resolve

This patch introduces a high-level method for resolving claims.
The behavior intends to replace the code in the API controller that is
used for resolving a claim.

To test:
1. Apply this patches
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Checkouts/ReturnClaim.t
=> SUCCESS: Tests pass
3. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: David Nind <david@davidnind.com>
Comment 6 David Nind 2021-06-18 20:16:25 UTC
Created attachment 122181 [details] [review]
Bug 28588: (follow-up) Make the API use the new method

This patch adapts the controller method for resolving a return claim so
it uses the Koha::Checkouts::ReturnClaim method instead.

To test:
1. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/return_claims.t
=> SUCCESS: Tests pass!
2. Apply this patch
3. Repeat 1
=> SUCCESS: Tests pass!
4. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: David Nind <david@davidnind.com>
Comment 7 Kyle M Hall (khall) 2021-06-21 11:35:40 UTC
Created attachment 122219 [details] [review]
Bug 28588: Unit tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 8 Kyle M Hall (khall) 2021-06-21 11:35:53 UTC
Created attachment 122220 [details] [review]
Bug 28588: Add Koha::Checkouts::ReturnClaim->resolve

This patch introduces a high-level method for resolving claims.
The behavior intends to replace the code in the API controller that is
used for resolving a claim.

To test:
1. Apply this patches
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Checkouts/ReturnClaim.t
=> SUCCESS: Tests pass
3. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 9 Kyle M Hall (khall) 2021-06-21 11:35:56 UTC
Created attachment 122221 [details] [review]
Bug 28588: (follow-up) Make the API use the new method

This patch adapts the controller method for resolving a return claim so
it uses the Koha::Checkouts::ReturnClaim method instead.

To test:
1. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/return_claims.t
=> SUCCESS: Tests pass!
2. Apply this patch
3. Repeat 1
=> SUCCESS: Tests pass!
4. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 10 Jonathan Druart 2021-06-23 13:07:01 UTC
Pushed to master for 21.11, thanks to everybody involved!
Comment 11 Kyle M Hall (khall) 2021-07-09 14:32:11 UTC
Enhancement not pushed to 21.05.x