Bug 29288 - Add current_checkouts and old_checkouts methods to Koha::Biblio
Summary: Add current_checkouts and old_checkouts methods to Koha::Biblio
Status: RESOLVED 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: Martin Renvoize
URL:
Keywords:
Depends on: 11175
Blocks: 29290
  Show dependency treegraph
 
Reported: 2021-10-20 21:01 UTC by Tomás Cohen Arazi
Modified: 2021-10-29 16:23 UTC (History)
4 users (show)

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


Attachments
Bug 29288: Unit tests (2.17 KB, patch)
2021-10-20 21:03 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 29288: Add current_checkouts and old_checkouts methods to Koha::Biblio (1.94 KB, patch)
2021-10-20 21:03 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 29288: Unit tests (2.22 KB, patch)
2021-10-20 22:36 UTC, David Nind
Details | Diff | Splinter Review
Bug 29288: Add current_checkouts and old_checkouts methods to Koha::Biblio (1.99 KB, patch)
2021-10-20 22:36 UTC, David Nind
Details | Diff | Splinter Review
Bug 29288: Unit tests (2.28 KB, patch)
2021-10-21 08:20 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 29288: Add current_checkouts and old_checkouts methods to Koha::Biblio (2.05 KB, patch)
2021-10-21 08:20 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 29288: Unit tests (2.37 KB, patch)
2021-10-27 11:46 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 29288: Add current_checkouts and old_checkouts methods to Koha::Biblio (2.07 KB, patch)
2021-10-27 11:46 UTC, Tomás Cohen Arazi
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 2021-10-20 21:01:04 UTC
It would be handy to have such methods. Needed for a follow-up bug.
Comment 1 Tomás Cohen Arazi 2021-10-20 21:03:38 UTC
Created attachment 126614 [details] [review]
Bug 29288: Unit tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 2 Tomás Cohen Arazi 2021-10-20 21:03:42 UTC
Created attachment 126615 [details] [review]
Bug 29288: Add current_checkouts and old_checkouts methods to Koha::Biblio

This patch adds helper methods for accessing current and past checkouts
for a given Koha::Biblio object.

To test:
1. Apply the unit tests
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Biblio.t
=> FAIL: Methods are not implemented
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 David Nind 2021-10-20 22:36:53 UTC
Created attachment 126629 [details] [review]
Bug 29288: Unit tests

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

Signed-off-by: David Nind <david@davidnind.com>
Comment 4 David Nind 2021-10-20 22:36:57 UTC
Created attachment 126630 [details] [review]
Bug 29288: Add current_checkouts and old_checkouts methods to Koha::Biblio

This patch adds helper methods for accessing current and past checkouts
for a given Koha::Biblio object.

To test:
1. Apply the unit tests
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Biblio.t
=> FAIL: Methods are not implemented
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: David Nind <david@davidnind.com>
Comment 5 Martin Renvoize 2021-10-21 08:20:13 UTC
Created attachment 126642 [details] [review]
Bug 29288: Unit tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 6 Martin Renvoize 2021-10-21 08:20:17 UTC
Created attachment 126643 [details] [review]
Bug 29288: Add current_checkouts and old_checkouts methods to Koha::Biblio

This patch adds helper methods for accessing current and past checkouts
for a given Koha::Biblio object.

To test:
1. Apply the unit tests
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Biblio.t
=> FAIL: Methods are not implemented
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: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 7 Martin Renvoize 2021-10-21 08:20:51 UTC
I wondered if there was any way to do this directly with relations, but it appears not.

As such, it's looking good and works as expected..

Passing QA
Comment 8 Tomás Cohen Arazi 2021-10-27 11:46:07 UTC
Created attachment 126973 [details] [review]
Bug 29288: Unit tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 9 Tomás Cohen Arazi 2021-10-27 11:46:12 UTC
Created attachment 126974 [details] [review]
Bug 29288: Add current_checkouts and old_checkouts methods to Koha::Biblio

This patch adds helper methods for accessing current and past checkouts
for a given Koha::Biblio object.

To test:
1. Apply the unit tests
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Biblio.t
=> FAIL: Methods are not implemented
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: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 10 Tomás Cohen Arazi 2021-10-27 11:46:59 UTC
Rebased on top of bug 14957.
Comment 11 Jonathan Druart 2021-10-28 15:45:19 UTC
Pushed to master for 21.11, thanks to everybody involved!