Bug 31328 - Make Koha::Item->get_transfer* use Koha::Item::Transfers->filter_by_current
Summary: Make Koha::Item->get_transfer* use Koha::Item::Transfers->filter_by_current
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Tomás Cohen Arazi
QA Contact: Testopia
URL:
Keywords:
Depends on: 31183
Blocks:
  Show dependency treegraph
 
Reported: 2022-08-09 11:39 UTC by Tomás Cohen Arazi
Modified: 2023-06-08 22:26 UTC (History)
2 users (show)

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


Attachments
Bug 31328: Make Koha::Item->get_transfer* use Koha::Item::Transfers->filter_by_current (2.42 KB, patch)
2022-08-09 11:43 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 31328: Make Koha::Item->get_transfer* use Koha::Item::Transfers->filter_by_current (2.50 KB, patch)
2022-08-10 13:38 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 31328: Call get_transfers from get_transfer (1.03 KB, patch)
2022-08-10 13:38 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 31328: Make Koha::Item->get_transfer* use Koha::Item::Transfers->filter_by_current (2.56 KB, patch)
2022-08-10 14:01 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 31328: Call get_transfers from get_transfer (1.09 KB, patch)
2022-08-10 14:01 UTC, Martin Renvoize
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 2022-08-09 11:39:42 UTC

    
Comment 1 Tomás Cohen Arazi 2022-08-09 11:43:00 UTC
Created attachment 138899 [details] [review]
Bug 31328: Make Koha::Item->get_transfer* use Koha::Item::Transfers->filter_by_current

This patch makes the get_transfer and get_transfers methods internally
use the new ->filter_by_current method.

To test:
1. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Item.t
=> SUCCESS: Tests pass!
2. Apply this rewriting patch
3. Repeat 1
=> SUCCESS: Tests still pass!
4. Sign off :-D
Comment 2 Jonathan Druart 2022-08-10 13:38:07 UTC
Created attachment 138983 [details] [review]
Bug 31328: Make Koha::Item->get_transfer* use Koha::Item::Transfers->filter_by_current

This patch makes the get_transfer and get_transfers methods internally
use the new ->filter_by_current method.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 3 Jonathan Druart 2022-08-10 13:38:11 UTC
Created attachment 138984 [details] [review]
Bug 31328: Call get_transfers from get_transfer

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 4 Martin Renvoize 2022-08-10 14:01:55 UTC
Created attachment 138990 [details] [review]
Bug 31328: Make Koha::Item->get_transfer* use Koha::Item::Transfers->filter_by_current

This patch makes the get_transfer and get_transfers methods internally
use the new ->filter_by_current method.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 5 Martin Renvoize 2022-08-10 14:01:59 UTC
Created attachment 138991 [details] [review]
Bug 31328: Call get_transfers from get_transfer

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 6 Tomás Cohen Arazi 2022-08-16 12:20:58 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!
Comment 7 Lucas Gass 2022-09-30 23:12:41 UTC
Enhancement will not be backported to 22.05.x series