Bug 31183 - Add Koha::Item::Transfers->filter_by_current
Summary: Add Koha::Item::Transfers->filter_by_current
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 (vote)
Assignee: Tomás Cohen Arazi
QA Contact: Testopia
URL:
Keywords:
Depends on: 30447
Blocks: 31328
  Show dependency treegraph
 
Reported: 2022-07-18 21:32 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 31183: Unit tests (1.77 KB, patch)
2022-07-18 21:48 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 31183: Add Koha::Item::Transfers->filter_by_current (1.28 KB, patch)
2022-07-18 21:48 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 31183: Use filter_by_current in Koha::Holds->get_items_that_can_fill (1.29 KB, patch)
2022-07-18 21:48 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 31183: Unit tests (1.77 KB, patch)
2022-07-20 17:07 UTC, Michal Urban
Details | Diff | Splinter Review
Bug 31183: Add Koha::Item::Transfers->filter_by_current (1.28 KB, patch)
2022-07-20 17:07 UTC, Michal Urban
Details | Diff | Splinter Review
Bug 31183: Use filter_by_current in Koha::Holds->get_items_that_can_fill (1.28 KB, patch)
2022-07-20 17:07 UTC, Michal Urban
Details | Diff | Splinter Review
Bug 31183: Unit tests (1.85 KB, patch)
2022-08-09 09:34 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 31183: Add Koha::Item::Transfers->filter_by_current (1.36 KB, patch)
2022-08-09 09:34 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 31183: Use filter_by_current in Koha::Holds->get_items_that_can_fill (1.42 KB, patch)
2022-08-09 09:34 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 Tomás Cohen Arazi 2022-07-18 21:32:27 UTC

    
Comment 1 Tomás Cohen Arazi 2022-07-18 21:48:26 UTC
Created attachment 137851 [details] [review]
Bug 31183: Unit tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 2 Tomás Cohen Arazi 2022-07-18 21:48:30 UTC
Created attachment 137852 [details] [review]
Bug 31183: Add Koha::Item::Transfers->filter_by_current

This patch introduces the aforementioned method.

To test:
1. Apply this unit tests patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Item/Transfers.t
=> FaIL: method not defined?
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 3 Tomás Cohen Arazi 2022-07-18 21:48:34 UTC
Created attachment 137853 [details] [review]
Bug 31183: Use filter_by_current in Koha::Holds->get_items_that_can_fill

This patch makes the method use the new
Koha::Item::Transfers->filter_by_current one.

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

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 4 Michal Urban 2022-07-20 17:07:18 UTC
Created attachment 137944 [details] [review]
Bug 31183: Unit tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 5 Michal Urban 2022-07-20 17:07:22 UTC
Created attachment 137945 [details] [review]
Bug 31183: Add Koha::Item::Transfers->filter_by_current

This patch introduces the aforementioned method.

To test:
1. Apply this unit tests patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Item/Transfers.t
=> FaIL: method not defined?
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 6 Michal Urban 2022-07-20 17:07:25 UTC
Created attachment 137946 [details] [review]
Bug 31183: Use filter_by_current in Koha::Holds->get_items_that_can_fill

This patch makes the method use the new
Koha::Item::Transfers->filter_by_current one.

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

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Michal Urban <michalurban177@gmail.com>
Comment 7 Jonathan Druart 2022-08-09 09:34:28 UTC
Created attachment 138887 [details] [review]
Bug 31183: Unit tests

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 8 Jonathan Druart 2022-08-09 09:34:32 UTC
Created attachment 138888 [details] [review]
Bug 31183: Add Koha::Item::Transfers->filter_by_current

This patch introduces the aforementioned method.

To test:
1. Apply this unit tests patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Item/Transfers.t
=> FaIL: method not defined?
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. Sign off :-D

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 9 Jonathan Druart 2022-08-09 09:34:37 UTC
Created attachment 138889 [details] [review]
Bug 31183: Use filter_by_current in Koha::Holds->get_items_that_can_fill

This patch makes the method use the new
Koha::Item::Transfers->filter_by_current one.

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

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Michal Urban <michalurban177@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 10 Jonathan Druart 2022-08-09 09:36:25 UTC
Shouldn't we use it from Koha::Item->get_transfers as well?
Comment 11 Tomás Cohen Arazi 2022-08-09 10:55:06 UTC
(In reply to Jonathan Druart from comment #10)
> Shouldn't we use it from Koha::Item->get_transfers as well?

Yes! I forgot!
Comment 12 Tomás Cohen Arazi 2022-08-09 11:46:44 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!
Comment 13 Lucas Gass 2022-09-30 22:38:08 UTC
Enhancement will not be backported to 22.05.x series unless requested