Bug 28588 - Add Koha::Checkouts::ReturnClaim->resolve
Summary: Add Koha::Checkouts::ReturnClaim->resolve
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Tomás Cohen Arazi (tcohen)
QA Contact: Kyle M Hall (khall)
URL:
Keywords:
Depends on: 28271
Blocks: 28593 28595
  Show dependency treegraph
 
Reported: 2021-06-17 19:16 UTC by Tomás Cohen Arazi (tcohen)
Modified: 2021-07-09 14:32 UTC (History)
4 users (show)

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


Attachments
Bug 28588: Unit tests (4.84 KB, patch)
2021-06-18 19:39 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 28588: Add Koha::Checkouts::ReturnClaim->resolve (2.43 KB, patch)
2021-06-18 19:39 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 28588: (follow-up) Make the API use the new method (2.02 KB, patch)
2021-06-18 19:39 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 28588: Unit tests (4.89 KB, patch)
2021-06-18 20:16 UTC, David Nind
Details | Diff | Splinter Review
Bug 28588: Add Koha::Checkouts::ReturnClaim->resolve (2.48 KB, patch)
2021-06-18 20:16 UTC, David Nind
Details | Diff | Splinter Review
Bug 28588: (follow-up) Make the API use the new method (2.07 KB, patch)
2021-06-18 20:16 UTC, David Nind
Details | Diff | Splinter Review
Bug 28588: Unit tests (4.96 KB, patch)
2021-06-21 11:35 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 28588: Add Koha::Checkouts::ReturnClaim->resolve (2.55 KB, patch)
2021-06-21 11:35 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 28588: (follow-up) Make the API use the new method (2.14 KB, patch)
2021-06-21 11:35 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review

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