Bug 30275 - Checkout renewals should be stored in their own table
Summary: Checkout renewals should be stored in their own table
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Martin Renvoize
QA Contact: Tomás Cohen Arazi
URL:
Keywords:
Depends on:
Blocks: 33284 23838 29021 30637 30642 31133
  Show dependency treegraph
 
Reported: 2022-03-11 08:12 UTC by Martin Renvoize
Modified: 2023-12-28 20:42 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Medium patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This enhancement adds a renewals table to store details of a checkouts renewals.
Version(s) released in:
22.11.00


Attachments
Bug 30275: Add checkout_renewals table (2.06 KB, patch)
2022-03-11 16:10 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Generated kohastructure.sql (2.05 KB, patch)
2022-03-11 16:10 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: DBIC Schema Changes (4.22 KB, patch)
2022-03-11 16:10 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Record renewals (1001 bytes, patch)
2022-03-11 16:10 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: DBIC Schema Additions (1.71 KB, patch)
2022-03-11 16:10 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Add Koha::Objects for Renewals (6.56 KB, patch)
2022-03-11 16:10 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Rename issues.renewals to issues.renewals_count (12.61 KB, patch)
2022-03-11 16:10 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: renewals_count DBIC Update (1.40 KB, patch)
2022-03-11 16:10 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Add 'renewals' relation to Issue Schema (908 bytes, patch)
2022-03-11 16:10 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Add renewals relation to Koha::Checkout (981 bytes, patch)
2022-03-11 16:10 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Add `/api/v1/checkouts/{checkout_id}/renewals` (3.78 KB, patch)
2022-03-11 16:10 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Add alias to create renewal in api routes (1.82 KB, patch)
2022-03-11 16:17 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Add checkout_renewals table (2.06 KB, patch)
2022-03-11 16:42 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Generated kohastructure.sql (2.05 KB, patch)
2022-03-11 16:42 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: DBIC Schema Changes (4.22 KB, patch)
2022-03-11 16:42 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Record renewals (1001 bytes, patch)
2022-03-11 16:42 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: DBIC Schema Additions (1.71 KB, patch)
2022-03-11 16:42 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Add Koha::Objects for Renewals (6.56 KB, patch)
2022-03-11 16:42 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Rename issues.renewals to issues.renewals_count (12.61 KB, patch)
2022-03-11 16:42 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: renewals_count DBIC Update (1.40 KB, patch)
2022-03-11 16:42 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Add 'renewals' relation to Issue Schema (908 bytes, patch)
2022-03-11 16:42 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Add renewals relation to Koha::Checkout (981 bytes, patch)
2022-03-11 16:42 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Add `/api/v1/checkouts/{checkout_id}/renewals` (5.19 KB, patch)
2022-03-11 16:42 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Add alias to create renewal in api routes (1.82 KB, patch)
2022-03-11 16:42 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Add checkout_renewals table (2.06 KB, patch)
2022-03-18 12:14 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Generated kohastructure.sql (2.05 KB, patch)
2022-03-18 12:14 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: DBIC Schema Changes (3.72 KB, patch)
2022-03-18 12:14 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Record renewals (1001 bytes, patch)
2022-03-18 12:14 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: DBIC Schema Additions (1.71 KB, patch)
2022-03-18 12:14 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Add Koha::Objects for Renewals (6.56 KB, patch)
2022-03-18 12:14 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Rename issues.renewals to issues.renewals_count (13.53 KB, patch)
2022-03-18 12:14 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: renewals_count DBIC Update (1.40 KB, patch)
2022-03-18 12:14 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Add 'renewals' relation to Issue Schema (908 bytes, patch)
2022-03-18 12:14 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Add renewals relation to Koha::Checkout (1.31 KB, patch)
2022-03-18 12:14 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Add `/api/v1/checkouts/{checkout_id}/renewals` (5.89 KB, patch)
2022-03-18 12:14 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Add alias to create renewal in api routes (2.09 KB, patch)
2022-03-18 12:14 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Add checkout_renewals table (2.06 KB, patch)
2022-03-18 14:11 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Generated kohastructure.sql (2.05 KB, patch)
2022-03-18 14:11 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: DBIC Schema Changes (3.72 KB, patch)
2022-03-18 14:11 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Record renewals (1001 bytes, patch)
2022-03-18 14:11 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: DBIC Schema Additions (1.71 KB, patch)
2022-03-18 14:11 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Add Koha::Objects for Renewals (6.56 KB, patch)
2022-03-18 14:11 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Rename issues.renewals to issues.renewals_count (13.99 KB, patch)
2022-03-18 14:11 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: renewals_count DBIC Update (2.50 KB, patch)
2022-03-18 14:11 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Add 'renewals' relation to Issue Schema (908 bytes, patch)
2022-03-18 14:11 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Add renewals relation to Koha::Checkout (1.31 KB, patch)
2022-03-18 14:12 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Add `/api/v1/checkouts/{checkout_id}/renewals` (5.89 KB, patch)
2022-03-18 14:12 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Add alias to create renewal in api routes (2.09 KB, patch)
2022-03-18 14:12 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Fix checkouts.t unit test (1.10 KB, patch)
2022-03-18 14:12 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Add basic unit test for fetching renewals (1.43 KB, patch)
2022-03-18 14:12 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Add checkout_renewals table (2.06 KB, patch)
2022-04-26 14:41 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Generated kohastructure.sql (2.05 KB, patch)
2022-04-26 14:41 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: DBIC Schema Changes (3.72 KB, patch)
2022-04-26 14:42 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Record renewals (1001 bytes, patch)
2022-04-26 14:42 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: DBIC Schema Additions (1.71 KB, patch)
2022-04-26 14:42 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Add Koha::Objects for Renewals (6.56 KB, patch)
2022-04-26 14:42 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Rename issues.renewals to issues.renewals_count (13.99 KB, patch)
2022-04-26 14:42 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: renewals_count DBIC Update (2.50 KB, patch)
2022-04-26 14:42 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Add 'renewals' relation to Issue Schema (908 bytes, patch)
2022-04-26 14:42 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Add renewals relation to Koha::Checkout (1.31 KB, patch)
2022-04-26 14:42 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Add `/api/v1/checkouts/{checkout_id}/renewals` (4.78 KB, patch)
2022-04-26 14:42 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Add alias to create renewal in api routes (2.09 KB, patch)
2022-04-26 14:42 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Fix checkouts.t unit test (1.10 KB, patch)
2022-04-26 14:42 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Add basic unit test for fetching renewals (1.43 KB, patch)
2022-04-26 14:42 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: (follow-up) Rebase fixes (5.70 KB, patch)
2022-04-26 14:42 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Add checkout_renewals table (2.06 KB, patch)
2022-04-26 15:09 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Generated kohastructure.sql (2.05 KB, patch)
2022-04-26 15:09 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: DBIC Schema Changes (3.72 KB, patch)
2022-04-26 15:10 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Record renewals (1001 bytes, patch)
2022-04-26 15:10 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: DBIC Schema Additions (1.71 KB, patch)
2022-04-26 15:10 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Add Koha::Objects for Renewals (6.56 KB, patch)
2022-04-26 15:10 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Rename issues.renewals to issues.renewals_count (13.99 KB, patch)
2022-04-26 15:10 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: renewals_count DBIC Update (2.50 KB, patch)
2022-04-26 15:10 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Add 'renewals' relation to Issue Schema (908 bytes, patch)
2022-04-26 15:10 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Add renewals relation to Koha::Checkout (1.31 KB, patch)
2022-04-26 15:10 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Add `/api/v1/checkouts/{checkout_id}/renewals` (4.78 KB, patch)
2022-04-26 15:10 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Add alias to create renewal in api routes (2.09 KB, patch)
2022-04-26 15:10 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Fix checkouts.t unit test (1.10 KB, patch)
2022-04-26 15:10 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Add basic unit test for fetching renewals (1.43 KB, patch)
2022-04-26 15:10 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: (follow-up) Rebase fixes (5.70 KB, patch)
2022-04-26 15:11 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Add renewals relation to Koha::Old::Checkout (1.73 KB, patch)
2022-04-26 15:11 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Add checkout_renewals table (2.11 KB, patch)
2022-04-26 17:02 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 30275: Generated kohastructure.sql (2.10 KB, patch)
2022-04-26 17:02 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 30275: DBIC Schema Changes (3.77 KB, patch)
2022-04-26 17:02 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 30275: Record renewals (1.03 KB, patch)
2022-04-26 17:02 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 30275: DBIC Schema Additions (1.76 KB, patch)
2022-04-26 17:02 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 30275: Add Koha::Objects for Renewals (6.61 KB, patch)
2022-04-26 17:02 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 30275: Rename issues.renewals to issues.renewals_count (14.04 KB, patch)
2022-04-26 17:02 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 30275: renewals_count DBIC Update (2.55 KB, patch)
2022-04-26 17:02 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 30275: Add 'renewals' relation to Issue Schema (958 bytes, patch)
2022-04-26 17:02 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 30275: Add renewals relation to Koha::Checkout (1.36 KB, patch)
2022-04-26 17:02 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 30275: Add `/api/v1/checkouts/{checkout_id}/renewals` (4.83 KB, patch)
2022-04-26 17:02 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 30275: Add alias to create renewal in api routes (2.14 KB, patch)
2022-04-26 17:03 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 30275: Fix checkouts.t unit test (1.15 KB, patch)
2022-04-26 17:03 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 30275: Add basic unit test for fetching renewals (1.48 KB, patch)
2022-04-26 17:03 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 30275: (follow-up) Rebase fixes (5.75 KB, patch)
2022-04-26 17:03 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 30275: Add renewals relation to Koha::Old::Checkout (1.78 KB, patch)
2022-04-26 17:03 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 30275: Add checkout_renewals table (2.16 KB, patch)
2022-04-27 20:13 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 30275: Generated kohastructure.sql (2.16 KB, patch)
2022-04-27 20:13 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 30275: DBIC Schema Changes (3.82 KB, patch)
2022-04-27 20:14 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 30275: Record renewals (1.08 KB, patch)
2022-04-27 20:14 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 30275: DBIC Schema Additions (1.82 KB, patch)
2022-04-27 20:14 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 30275: Add Koha::Objects for Renewals (6.66 KB, patch)
2022-04-27 20:14 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 30275: Rename issues.renewals to issues.renewals_count (14.09 KB, patch)
2022-04-27 20:14 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 30275: renewals_count DBIC Update (2.61 KB, patch)
2022-04-27 20:14 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 30275: Add 'renewals' relation to Issue Schema (1013 bytes, patch)
2022-04-27 20:15 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 30275: Add renewals relation to Koha::Checkout (1.41 KB, patch)
2022-04-27 20:15 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 30275: Add `/api/v1/checkouts/{checkout_id}/renewals` (4.88 KB, patch)
2022-04-27 20:15 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 30275: Add alias to create renewal in api routes (2.19 KB, patch)
2022-04-27 20:15 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 30275: Fix checkouts.t unit test (1.20 KB, patch)
2022-04-27 20:15 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 30275: Add basic unit test for fetching renewals (1.53 KB, patch)
2022-04-27 20:15 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 30275: (follow-up) Rebase fixes (5.80 KB, patch)
2022-04-27 20:16 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 30275: Add renewals relation to Koha::Old::Checkout (1.84 KB, patch)
2022-04-27 20:16 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 30275: (QA follow-up) Rename columns to match API (9.52 KB, patch)
2022-04-27 20:16 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 30275: (follow-up) Drop renewer_id constraint (8.10 KB, patch)
2022-04-28 10:02 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Add checkout_renewals table (2.20 KB, patch)
2022-04-28 12:21 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Generated kohastructure.sql (2.16 KB, patch)
2022-04-28 12:21 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: DBIC Schema Changes (3.82 KB, patch)
2022-04-28 12:21 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Record renewals (1.08 KB, patch)
2022-04-28 12:21 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: DBIC Schema Additions (1.82 KB, patch)
2022-04-28 12:21 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Add Koha::Objects for Renewals (6.69 KB, patch)
2022-04-28 12:21 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Rename issues.renewals to issues.renewals_count (14.09 KB, patch)
2022-04-28 12:21 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: renewals_count DBIC Update (2.61 KB, patch)
2022-04-28 12:21 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Add 'renewals' relation to Issue Schema (1013 bytes, patch)
2022-04-28 12:21 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Add renewals relation to Koha::Checkout (1.41 KB, patch)
2022-04-28 12:21 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Add `/api/v1/checkouts/{checkout_id}/renewals` (4.88 KB, patch)
2022-04-28 12:22 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Add alias to create renewal in api routes (2.19 KB, patch)
2022-04-28 12:22 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Fix checkouts.t unit test (1.20 KB, patch)
2022-04-28 12:22 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Add basic unit test for fetching renewals (1.53 KB, patch)
2022-04-28 12:22 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: (follow-up) Rebase fixes (5.80 KB, patch)
2022-04-28 12:22 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Add renewals relation to Koha::Old::Checkout (1.84 KB, patch)
2022-04-28 12:22 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: (QA follow-up) Rename columns to match API (10.14 KB, patch)
2022-04-28 12:22 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: (follow-up) Drop renewer_id constraint (8.13 KB, patch)
2022-04-28 12:22 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Add unit tests for AddRenewal addition (1.93 KB, patch)
2022-04-28 12:22 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Add Unit test for renewals relation (1.56 KB, patch)
2022-04-28 12:23 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Unit Tests for Checkouts::Renewal (8.83 KB, patch)
2022-04-28 12:23 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: (follow-up) Drop renewer_id constraint (8.18 KB, patch)
2022-05-02 19:30 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 30275: Add unit tests for AddRenewal addition (1.99 KB, patch)
2022-05-02 19:30 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 30275: Add Unit test for renewals relation (1.61 KB, patch)
2022-05-02 19:30 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 30275: Unit Tests for Checkouts::Renewal (8.89 KB, patch)
2022-05-02 19:31 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 30275: Add checkout_renewals table (2.20 KB, patch)
2022-05-11 11:43 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Generated kohastructure.sql (2.16 KB, patch)
2022-05-11 11:43 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: DBIC Schema Changes (3.82 KB, patch)
2022-05-11 11:43 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Record renewals (1.08 KB, patch)
2022-05-11 11:44 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: DBIC Schema Additions (1.82 KB, patch)
2022-05-11 11:44 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Add Koha::Objects for Renewals (6.69 KB, patch)
2022-05-11 11:44 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Rename issues.renewals to issues.renewals_count (14.09 KB, patch)
2022-05-11 11:44 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: renewals_count DBIC Update (2.61 KB, patch)
2022-05-11 11:44 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Add 'renewals' relation to Issue Schema (1013 bytes, patch)
2022-05-11 11:44 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Add renewals relation to Koha::Checkout (1.41 KB, patch)
2022-05-11 11:44 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Add `/api/v1/checkouts/{checkout_id}/renewals` (4.86 KB, patch)
2022-05-11 11:44 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Add alias to create renewal in api routes (2.19 KB, patch)
2022-05-11 11:44 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Fix checkouts.t unit test (1.20 KB, patch)
2022-05-11 11:44 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Add basic unit test for fetching renewals (1.53 KB, patch)
2022-05-11 11:44 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: (follow-up) Rebase fixes (5.80 KB, patch)
2022-05-11 11:45 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Add renewals relation to Koha::Old::Checkout (1.84 KB, patch)
2022-05-11 11:45 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: (QA follow-up) Rename columns to match API (10.14 KB, patch)
2022-05-11 11:45 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: (follow-up) Drop renewer_id constraint (8.18 KB, patch)
2022-05-11 11:45 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Add unit tests for AddRenewal addition (1.99 KB, patch)
2022-05-11 11:45 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Add Unit test for renewals relation (1.61 KB, patch)
2022-05-11 11:45 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Unit Tests for Checkouts::Renewal (8.89 KB, patch)
2022-05-11 11:45 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Add checkout_renewals table (2.20 KB, patch)
2022-05-18 14:50 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Generated kohastructure.sql (2.16 KB, patch)
2022-05-18 14:50 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: DBIC Schema Changes (3.82 KB, patch)
2022-05-18 14:51 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Record renewals (1.08 KB, patch)
2022-05-18 14:51 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: DBIC Schema Additions (1.82 KB, patch)
2022-05-18 14:51 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Add Koha::Objects for Renewals (6.69 KB, patch)
2022-05-18 14:51 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Rename issues.renewals to issues.renewals_count (14.11 KB, patch)
2022-05-18 14:51 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: renewals_count DBIC Update (2.61 KB, patch)
2022-05-18 14:51 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Add 'renewals' relation to Issue Schema (1013 bytes, patch)
2022-05-18 14:51 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Add renewals relation to Koha::Checkout (1.41 KB, patch)
2022-05-18 14:51 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Add `/api/v1/checkouts/{checkout_id}/renewals` (4.86 KB, patch)
2022-05-18 14:52 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Add alias to create renewal in api routes (2.19 KB, patch)
2022-05-18 14:52 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Fix checkouts.t unit test (1.20 KB, patch)
2022-05-18 14:52 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Add basic unit test for fetching renewals (1.53 KB, patch)
2022-05-18 14:52 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: (follow-up) Rebase fixes (5.80 KB, patch)
2022-05-18 14:52 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Add renewals relation to Koha::Old::Checkout (1.84 KB, patch)
2022-05-18 14:52 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: (QA follow-up) Rename columns to match API (10.14 KB, patch)
2022-05-18 14:52 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: (follow-up) Drop renewer_id constraint (8.18 KB, patch)
2022-05-18 14:53 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Add unit tests for AddRenewal addition (1.99 KB, patch)
2022-05-18 14:53 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Add Unit test for renewals relation (1.61 KB, patch)
2022-05-18 14:53 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Unit Tests for Checkouts::Renewal (8.89 KB, patch)
2022-05-18 14:53 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Add checkout_renewals table (2.20 KB, patch)
2022-07-05 12:36 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Generated kohastructure.sql (2.16 KB, patch)
2022-07-05 12:36 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: DBIC Schema Changes (3.82 KB, patch)
2022-07-05 12:36 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Record renewals (1.08 KB, patch)
2022-07-05 12:36 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: DBIC Schema Additions (1.82 KB, patch)
2022-07-05 12:36 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Add Koha::Objects for Renewals (6.69 KB, patch)
2022-07-05 12:36 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Rename issues.renewals to issues.renewals_count (14.11 KB, patch)
2022-07-05 12:36 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: renewals_count DBIC Update (2.61 KB, patch)
2022-07-05 12:37 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Add 'renewals' relation to Issue Schema (1013 bytes, patch)
2022-07-05 12:37 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Add renewals relation to Koha::Checkout (1.41 KB, patch)
2022-07-05 12:37 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Add `/api/v1/checkouts/{checkout_id}/renewals` (4.86 KB, patch)
2022-07-05 12:37 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Add alias to create renewal in api routes (2.19 KB, patch)
2022-07-05 12:37 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Fix checkouts.t unit test (1.20 KB, patch)
2022-07-05 12:37 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Add basic unit test for fetching renewals (1.53 KB, patch)
2022-07-05 12:37 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: (follow-up) Rebase fixes (5.80 KB, patch)
2022-07-05 12:37 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Add renewals relation to Koha::Old::Checkout (1.84 KB, patch)
2022-07-05 12:37 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: (QA follow-up) Rename columns to match API (9.42 KB, patch)
2022-07-05 12:37 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: (follow-up) Drop renewer_id constraint (8.18 KB, patch)
2022-07-05 12:37 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Add unit tests for AddRenewal addition (1.79 KB, patch)
2022-07-05 12:38 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Add Unit test for renewals relation (1.61 KB, patch)
2022-07-05 12:38 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: Unit Tests for Checkouts::Renewal (8.89 KB, patch)
2022-07-05 12:38 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: (QA follow-up) Fix TestBuilder.t (1.06 KB, patch)
2022-07-06 15:04 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30275: (QA follow-up) Trivial fix to schema file (1.20 KB, patch)
2022-07-12 02:37 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 Martin Renvoize 2022-03-11 08:12:51 UTC
Bug 23838 highlighted the need to have a clear distinction between renewals and original issues.

I propose the addition of a new table, issue_renewals, to store this data.
Comment 1 Martin Renvoize 2022-03-11 11:17:21 UTC Comment hidden (obsolete)
Comment 2 Martin Renvoize 2022-03-11 16:10:15 UTC Comment hidden (obsolete)
Comment 3 Martin Renvoize 2022-03-11 16:10:18 UTC Comment hidden (obsolete)
Comment 4 Martin Renvoize 2022-03-11 16:10:22 UTC Comment hidden (obsolete)
Comment 5 Martin Renvoize 2022-03-11 16:10:26 UTC Comment hidden (obsolete)
Comment 6 Martin Renvoize 2022-03-11 16:10:29 UTC Comment hidden (obsolete)
Comment 7 Martin Renvoize 2022-03-11 16:10:33 UTC Comment hidden (obsolete)
Comment 8 Martin Renvoize 2022-03-11 16:10:37 UTC Comment hidden (obsolete)
Comment 9 Martin Renvoize 2022-03-11 16:10:40 UTC Comment hidden (obsolete)
Comment 10 Martin Renvoize 2022-03-11 16:10:44 UTC Comment hidden (obsolete)
Comment 11 Martin Renvoize 2022-03-11 16:10:48 UTC Comment hidden (obsolete)
Comment 12 Martin Renvoize 2022-03-11 16:10:51 UTC Comment hidden (obsolete)
Comment 13 Martin Renvoize 2022-03-11 16:11:22 UTC
Still needs unit tests.
Comment 14 Martin Renvoize 2022-03-11 16:17:53 UTC Comment hidden (obsolete)
Comment 15 Martin Renvoize 2022-03-11 16:42:02 UTC Comment hidden (obsolete)
Comment 16 Martin Renvoize 2022-03-11 16:42:07 UTC Comment hidden (obsolete)
Comment 17 Martin Renvoize 2022-03-11 16:42:11 UTC Comment hidden (obsolete)
Comment 18 Martin Renvoize 2022-03-11 16:42:15 UTC Comment hidden (obsolete)
Comment 19 Martin Renvoize 2022-03-11 16:42:19 UTC Comment hidden (obsolete)
Comment 20 Martin Renvoize 2022-03-11 16:42:23 UTC Comment hidden (obsolete)
Comment 21 Martin Renvoize 2022-03-11 16:42:27 UTC Comment hidden (obsolete)
Comment 22 Martin Renvoize 2022-03-11 16:42:32 UTC Comment hidden (obsolete)
Comment 23 Martin Renvoize 2022-03-11 16:42:35 UTC Comment hidden (obsolete)
Comment 24 Martin Renvoize 2022-03-11 16:42:39 UTC Comment hidden (obsolete)
Comment 25 Martin Renvoize 2022-03-11 16:42:43 UTC Comment hidden (obsolete)
Comment 26 Martin Renvoize 2022-03-11 16:42:47 UTC Comment hidden (obsolete)
Comment 27 Martin Renvoize 2022-03-18 12:14:12 UTC Comment hidden (obsolete)
Comment 28 Martin Renvoize 2022-03-18 12:14:16 UTC Comment hidden (obsolete)
Comment 29 Martin Renvoize 2022-03-18 12:14:20 UTC Comment hidden (obsolete)
Comment 30 Martin Renvoize 2022-03-18 12:14:24 UTC Comment hidden (obsolete)
Comment 31 Martin Renvoize 2022-03-18 12:14:27 UTC Comment hidden (obsolete)
Comment 32 Martin Renvoize 2022-03-18 12:14:31 UTC Comment hidden (obsolete)
Comment 33 Martin Renvoize 2022-03-18 12:14:34 UTC Comment hidden (obsolete)
Comment 34 Martin Renvoize 2022-03-18 12:14:38 UTC Comment hidden (obsolete)
Comment 35 Martin Renvoize 2022-03-18 12:14:42 UTC Comment hidden (obsolete)
Comment 36 Martin Renvoize 2022-03-18 12:14:46 UTC Comment hidden (obsolete)
Comment 37 Martin Renvoize 2022-03-18 12:14:50 UTC Comment hidden (obsolete)
Comment 38 Martin Renvoize 2022-03-18 12:14:53 UTC Comment hidden (obsolete)
Comment 39 Martin Renvoize 2022-03-18 14:11:25 UTC Comment hidden (obsolete)
Comment 40 Martin Renvoize 2022-03-18 14:11:29 UTC Comment hidden (obsolete)
Comment 41 Martin Renvoize 2022-03-18 14:11:33 UTC Comment hidden (obsolete)
Comment 42 Martin Renvoize 2022-03-18 14:11:37 UTC Comment hidden (obsolete)
Comment 43 Martin Renvoize 2022-03-18 14:11:40 UTC Comment hidden (obsolete)
Comment 44 Martin Renvoize 2022-03-18 14:11:44 UTC Comment hidden (obsolete)
Comment 45 Martin Renvoize 2022-03-18 14:11:48 UTC Comment hidden (obsolete)
Comment 46 Martin Renvoize 2022-03-18 14:11:52 UTC Comment hidden (obsolete)
Comment 47 Martin Renvoize 2022-03-18 14:11:56 UTC Comment hidden (obsolete)
Comment 48 Martin Renvoize 2022-03-18 14:12:00 UTC Comment hidden (obsolete)
Comment 49 Martin Renvoize 2022-03-18 14:12:04 UTC Comment hidden (obsolete)
Comment 50 Martin Renvoize 2022-03-18 14:12:08 UTC Comment hidden (obsolete)
Comment 51 Martin Renvoize 2022-03-18 14:12:12 UTC Comment hidden (obsolete)
Comment 52 Martin Renvoize 2022-03-18 14:12:15 UTC Comment hidden (obsolete)
Comment 53 Martin Renvoize 2022-03-18 14:27:11 UTC
The simplest way to test this is to test bug 23838 which relies on this foundational patch.
Comment 54 Martin Renvoize 2022-04-26 14:41:53 UTC Comment hidden (obsolete)
Comment 55 Martin Renvoize 2022-04-26 14:41:58 UTC Comment hidden (obsolete)
Comment 56 Martin Renvoize 2022-04-26 14:42:03 UTC Comment hidden (obsolete)
Comment 57 Martin Renvoize 2022-04-26 14:42:08 UTC Comment hidden (obsolete)
Comment 58 Martin Renvoize 2022-04-26 14:42:12 UTC Comment hidden (obsolete)
Comment 59 Martin Renvoize 2022-04-26 14:42:16 UTC Comment hidden (obsolete)
Comment 60 Martin Renvoize 2022-04-26 14:42:21 UTC Comment hidden (obsolete)
Comment 61 Martin Renvoize 2022-04-26 14:42:26 UTC Comment hidden (obsolete)
Comment 62 Martin Renvoize 2022-04-26 14:42:30 UTC Comment hidden (obsolete)
Comment 63 Martin Renvoize 2022-04-26 14:42:34 UTC Comment hidden (obsolete)
Comment 64 Martin Renvoize 2022-04-26 14:42:39 UTC Comment hidden (obsolete)
Comment 65 Martin Renvoize 2022-04-26 14:42:43 UTC Comment hidden (obsolete)
Comment 66 Martin Renvoize 2022-04-26 14:42:48 UTC Comment hidden (obsolete)
Comment 67 Martin Renvoize 2022-04-26 14:42:53 UTC Comment hidden (obsolete)
Comment 68 Martin Renvoize 2022-04-26 14:42:58 UTC Comment hidden (obsolete)
Comment 69 Martin Renvoize 2022-04-26 15:09:52 UTC Comment hidden (obsolete)
Comment 70 Martin Renvoize 2022-04-26 15:09:57 UTC Comment hidden (obsolete)
Comment 71 Martin Renvoize 2022-04-26 15:10:02 UTC Comment hidden (obsolete)
Comment 72 Martin Renvoize 2022-04-26 15:10:08 UTC Comment hidden (obsolete)
Comment 73 Martin Renvoize 2022-04-26 15:10:12 UTC Comment hidden (obsolete)
Comment 74 Martin Renvoize 2022-04-26 15:10:17 UTC Comment hidden (obsolete)
Comment 75 Martin Renvoize 2022-04-26 15:10:22 UTC Comment hidden (obsolete)
Comment 76 Martin Renvoize 2022-04-26 15:10:27 UTC Comment hidden (obsolete)
Comment 77 Martin Renvoize 2022-04-26 15:10:32 UTC Comment hidden (obsolete)
Comment 78 Martin Renvoize 2022-04-26 15:10:37 UTC Comment hidden (obsolete)
Comment 79 Martin Renvoize 2022-04-26 15:10:42 UTC Comment hidden (obsolete)
Comment 80 Martin Renvoize 2022-04-26 15:10:47 UTC Comment hidden (obsolete)
Comment 81 Martin Renvoize 2022-04-26 15:10:51 UTC Comment hidden (obsolete)
Comment 82 Martin Renvoize 2022-04-26 15:10:56 UTC Comment hidden (obsolete)
Comment 83 Martin Renvoize 2022-04-26 15:11:02 UTC Comment hidden (obsolete)
Comment 84 Martin Renvoize 2022-04-26 15:11:07 UTC Comment hidden (obsolete)
Comment 85 Owen Leonard 2022-04-26 17:02:05 UTC Comment hidden (obsolete)
Comment 86 Owen Leonard 2022-04-26 17:02:10 UTC Comment hidden (obsolete)
Comment 87 Owen Leonard 2022-04-26 17:02:15 UTC Comment hidden (obsolete)
Comment 88 Owen Leonard 2022-04-26 17:02:20 UTC Comment hidden (obsolete)
Comment 89 Owen Leonard 2022-04-26 17:02:25 UTC Comment hidden (obsolete)
Comment 90 Owen Leonard 2022-04-26 17:02:30 UTC Comment hidden (obsolete)
Comment 91 Owen Leonard 2022-04-26 17:02:35 UTC Comment hidden (obsolete)
Comment 92 Owen Leonard 2022-04-26 17:02:40 UTC Comment hidden (obsolete)
Comment 93 Owen Leonard 2022-04-26 17:02:45 UTC Comment hidden (obsolete)
Comment 94 Owen Leonard 2022-04-26 17:02:50 UTC Comment hidden (obsolete)
Comment 95 Owen Leonard 2022-04-26 17:02:55 UTC Comment hidden (obsolete)
Comment 96 Owen Leonard 2022-04-26 17:03:00 UTC Comment hidden (obsolete)
Comment 97 Owen Leonard 2022-04-26 17:03:05 UTC Comment hidden (obsolete)
Comment 98 Owen Leonard 2022-04-26 17:03:10 UTC Comment hidden (obsolete)
Comment 99 Owen Leonard 2022-04-26 17:03:14 UTC Comment hidden (obsolete)
Comment 100 Owen Leonard 2022-04-26 17:03:19 UTC Comment hidden (obsolete)
Comment 101 Tomás Cohen Arazi 2022-04-27 20:13:50 UTC Comment hidden (obsolete)
Comment 102 Tomás Cohen Arazi 2022-04-27 20:13:56 UTC Comment hidden (obsolete)
Comment 103 Tomás Cohen Arazi 2022-04-27 20:14:04 UTC Comment hidden (obsolete)
Comment 104 Tomás Cohen Arazi 2022-04-27 20:14:12 UTC Comment hidden (obsolete)
Comment 105 Tomás Cohen Arazi 2022-04-27 20:14:20 UTC Comment hidden (obsolete)
Comment 106 Tomás Cohen Arazi 2022-04-27 20:14:29 UTC Comment hidden (obsolete)
Comment 107 Tomás Cohen Arazi 2022-04-27 20:14:39 UTC Comment hidden (obsolete)
Comment 108 Tomás Cohen Arazi 2022-04-27 20:14:56 UTC Comment hidden (obsolete)
Comment 109 Tomás Cohen Arazi 2022-04-27 20:15:07 UTC Comment hidden (obsolete)
Comment 110 Tomás Cohen Arazi 2022-04-27 20:15:17 UTC Comment hidden (obsolete)
Comment 111 Tomás Cohen Arazi 2022-04-27 20:15:28 UTC Comment hidden (obsolete)
Comment 112 Tomás Cohen Arazi 2022-04-27 20:15:36 UTC Comment hidden (obsolete)
Comment 113 Tomás Cohen Arazi 2022-04-27 20:15:44 UTC Comment hidden (obsolete)
Comment 114 Tomás Cohen Arazi 2022-04-27 20:15:52 UTC Comment hidden (obsolete)
Comment 115 Tomás Cohen Arazi 2022-04-27 20:16:00 UTC Comment hidden (obsolete)
Comment 116 Tomás Cohen Arazi 2022-04-27 20:16:09 UTC Comment hidden (obsolete)
Comment 117 Tomás Cohen Arazi 2022-04-27 20:16:17 UTC
Created attachment 134193 [details] [review]
Bug 30275: (QA follow-up) Rename columns to match API

This patch performs the following column renames:

* id => renewal_id
* issue_id => checkout_id

The idea is that no translation is needed for the API, and also, being a
new table, we can educate the users into the 'to be' terminology we are
leaning towards, instead of having them learn one naming to create
reports and then need to translate them once we normalize things in a
future.

That said, this is simple to review.

Apply this patch and repeat the test plan.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 118 Tomás Cohen Arazi 2022-04-27 20:19:20 UTC
I'll finish my review tomorrow.

Overall, this is what I wanted to see on bug 23838, so I'm happy for this, Martin. Great!

It is lacking (at least) tests for the new Koha::Checkouts::Renewal->store method. I can add it, but got late today to do it.

I would like to see some higher-level method, like Koha::Checkout->renew and start removing old code but we can do that in a follow-up, this is solid as it stands.
Comment 119 David Cook 2022-04-27 23:57:06 UTC
(In reply to Tomás Cohen Arazi from comment #118)
> I would like to see some higher-level method, like Koha::Checkout->renew and
> start removing old code but we can do that in a follow-up

+1
Comment 120 Martin Renvoize 2022-04-28 07:26:35 UTC
Awesome, thanks for the review Tomas. I'm happy to work on tests today, revisiting it yesterday my intention was to add some more tests as I also found them to be lacking. I got held up as it appears Circulation.t is failing already due to the constraint added here.. but I can't for the life of me work out why as the data does appear to be present and correct in k-t-d where I was testing.
Comment 121 Martin Renvoize 2022-04-28 10:02:53 UTC
Created attachment 134210 [details] [review]
Bug 30275: (follow-up) Drop renewer_id constraint

This patch fixes some unit tests by ensureing we set a valid userid for
mock userenv setting so that the foreign key constraint doesn't fail and
it also removes the exception class and check for renewer_id from the
store method as, for example with autorenewals, the renewal may not have
been triggered by a actual user.
Comment 122 Martin Renvoize 2022-04-28 12:21:01 UTC Comment hidden (obsolete)
Comment 123 Martin Renvoize 2022-04-28 12:21:07 UTC Comment hidden (obsolete)
Comment 124 Martin Renvoize 2022-04-28 12:21:13 UTC Comment hidden (obsolete)
Comment 125 Martin Renvoize 2022-04-28 12:21:19 UTC Comment hidden (obsolete)
Comment 126 Martin Renvoize 2022-04-28 12:21:25 UTC Comment hidden (obsolete)
Comment 127 Martin Renvoize 2022-04-28 12:21:31 UTC Comment hidden (obsolete)
Comment 128 Martin Renvoize 2022-04-28 12:21:36 UTC Comment hidden (obsolete)
Comment 129 Martin Renvoize 2022-04-28 12:21:42 UTC Comment hidden (obsolete)
Comment 130 Martin Renvoize 2022-04-28 12:21:49 UTC Comment hidden (obsolete)
Comment 131 Martin Renvoize 2022-04-28 12:21:55 UTC Comment hidden (obsolete)
Comment 132 Martin Renvoize 2022-04-28 12:22:01 UTC Comment hidden (obsolete)
Comment 133 Martin Renvoize 2022-04-28 12:22:08 UTC Comment hidden (obsolete)
Comment 134 Martin Renvoize 2022-04-28 12:22:14 UTC Comment hidden (obsolete)
Comment 135 Martin Renvoize 2022-04-28 12:22:24 UTC Comment hidden (obsolete)
Comment 136 Martin Renvoize 2022-04-28 12:22:30 UTC Comment hidden (obsolete)
Comment 137 Martin Renvoize 2022-04-28 12:22:36 UTC Comment hidden (obsolete)
Comment 138 Martin Renvoize 2022-04-28 12:22:42 UTC Comment hidden (obsolete)
Comment 139 Martin Renvoize 2022-04-28 12:22:48 UTC Comment hidden (obsolete)
Comment 140 Martin Renvoize 2022-04-28 12:22:57 UTC Comment hidden (obsolete)
Comment 141 Martin Renvoize 2022-04-28 12:23:04 UTC Comment hidden (obsolete)
Comment 142 Martin Renvoize 2022-04-28 12:23:10 UTC Comment hidden (obsolete)
Comment 143 Martin Renvoize 2022-04-28 12:24:26 UTC
Lots of unit tests.. all praise the unit tests :)
Comment 144 Tomás Cohen Arazi 2022-05-02 19:30:39 UTC Comment hidden (obsolete)
Comment 145 Tomás Cohen Arazi 2022-05-02 19:30:49 UTC Comment hidden (obsolete)
Comment 146 Tomás Cohen Arazi 2022-05-02 19:30:57 UTC Comment hidden (obsolete)
Comment 147 Tomás Cohen Arazi 2022-05-02 19:31:08 UTC Comment hidden (obsolete)
Comment 148 Martin Renvoize 2022-05-11 11:43:36 UTC
Created attachment 134869 [details] [review]
Bug 30275: Add checkout_renewals table

This patch adds the new checkout_renewals table using an atomicupdate

Sponsored-by: Loughborough University
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 149 Martin Renvoize 2022-05-11 11:43:47 UTC
Created attachment 134870 [details] [review]
Bug 30275: Generated kohastructure.sql

This kohastructure update was generated using `koha-dump --schema-only`
in koha-testing-docker once the atomicupdate had been run against the
previous atomicupdate patch.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 150 Martin Renvoize 2022-05-11 11:43:57 UTC
Created attachment 134871 [details] [review]
Bug 30275: DBIC Schema Changes

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 151 Martin Renvoize 2022-05-11 11:44:02 UTC
Created attachment 134872 [details] [review]
Bug 30275: Record renewals

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 152 Martin Renvoize 2022-05-11 11:44:09 UTC
Created attachment 134873 [details] [review]
Bug 30275: DBIC Schema Additions

Add checkout and old_checkout relations to CheckoutRenewal schema and
mark 'seen' as a boolean.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 153 Martin Renvoize 2022-05-11 11:44:14 UTC
Created attachment 134874 [details] [review]
Bug 30275: Add Koha::Objects for Renewals

Add Koha::Checkouts::Renewals|Renewal classes

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 154 Martin Renvoize 2022-05-11 11:44:20 UTC
Created attachment 134875 [details] [review]
Bug 30275: Rename issues.renewals to issues.renewals_count

Rename the issues.renewals field to renewals_count to prevent a method
name collision with the new relation accessor introduced by this
patchset.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 155 Martin Renvoize 2022-05-11 11:44:26 UTC
Created attachment 134876 [details] [review]
Bug 30275: renewals_count DBIC Update

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 156 Martin Renvoize 2022-05-11 11:44:31 UTC
Created attachment 134877 [details] [review]
Bug 30275: Add 'renewals' relation to Issue Schema

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 157 Martin Renvoize 2022-05-11 11:44:36 UTC
Created attachment 134878 [details] [review]
Bug 30275: Add renewals relation to Koha::Checkout

Add the new 'renewals' relation to Koha::Checkout to return a list of
Koha::Checkouts::Renewal objects.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 158 Martin Renvoize 2022-05-11 11:44:42 UTC
Created attachment 134879 [details] [review]
Bug 30275: Add `/api/v1/checkouts/{checkout_id}/renewals`

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 159 Martin Renvoize 2022-05-11 11:44:48 UTC
Created attachment 134880 [details] [review]
Bug 30275: Add alias to create renewal in api routes

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 160 Martin Renvoize 2022-05-11 11:44:53 UTC
Created attachment 134881 [details] [review]
Bug 30275: Fix checkouts.t unit test

We no longer require a mocked userenv for these tests to pass, we're
setting the userenv in api auth now. The mock just serves to break tests
for the renew method now that AddRenewal required a correctly set
userenv for 'number'.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 161 Martin Renvoize 2022-05-11 11:44:59 UTC
Created attachment 134882 [details] [review]
Bug 30275: Add basic unit test for fetching renewals

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 162 Martin Renvoize 2022-05-11 11:45:05 UTC
Created attachment 134883 [details] [review]
Bug 30275: (follow-up) Rebase fixes

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 163 Martin Renvoize 2022-05-11 11:45:11 UTC
Created attachment 134884 [details] [review]
Bug 30275: Add renewals relation to Koha::Old::Checkout

Add the new 'renewals' relation to Koha::Old::Checkout to return a
list of Koha::Checkouts::Renewal objects.

We also add the same relation to the OldIssue schema inline.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 164 Martin Renvoize 2022-05-11 11:45:17 UTC
Created attachment 134885 [details] [review]
Bug 30275: (QA follow-up) Rename columns to match API

This patch performs the following column renames:

* id => renewal_id
* issue_id => checkout_id

The idea is that no translation is needed for the API, and also, being a
new table, we can educate the users into the 'to be' terminology we are
leaning towards, instead of having them learn one naming to create
reports and then need to translate them once we normalize things in a
future.

That said, this is simple to review.

Apply this patch and repeat the test plan.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 165 Martin Renvoize 2022-05-11 11:45:23 UTC
Created attachment 134886 [details] [review]
Bug 30275: (follow-up) Drop renewer_id constraint

This patch fixes some unit tests by ensureing we set a valid userid for
mock userenv setting so that the foreign key constraint doesn't fail and
it also removes the exception class and check for renewer_id from the
store method as, for example with autorenewals, the renewal may not have
been triggered by a actual user.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 166 Martin Renvoize 2022-05-11 11:45:29 UTC
Created attachment 134887 [details] [review]
Bug 30275: Add unit tests for AddRenewal addition

This patch adds a test for the AddRenewal addition that creates Renewal
lines.

Test plan
1) Run the unit tests and confirm it passes

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 167 Martin Renvoize 2022-05-11 11:45:35 UTC
Created attachment 134888 [details] [review]
Bug 30275: Add Unit test for renewals relation

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 168 Martin Renvoize 2022-05-11 11:45:41 UTC
Created attachment 134889 [details] [review]
Bug 30275: Unit Tests for Checkouts::Renewal

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 169 Martin Renvoize 2022-05-11 11:46:10 UTC
Just another rebase to keep it fresh
Comment 170 Jonathan Druart 2022-05-18 13:38:56 UTC
Please run the QA scripts, there are tiny issues to fix.

There are also several tests that are failing.
Comment 171 Martin Renvoize 2022-05-18 14:50:53 UTC
Created attachment 135123 [details] [review]
Bug 30275: Add checkout_renewals table

This patch adds the new checkout_renewals table using an atomicupdate

Sponsored-by: Loughborough University
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 172 Martin Renvoize 2022-05-18 14:50:59 UTC
Created attachment 135124 [details] [review]
Bug 30275: Generated kohastructure.sql

This kohastructure update was generated using `koha-dump --schema-only`
in koha-testing-docker once the atomicupdate had been run against the
previous atomicupdate patch.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 173 Martin Renvoize 2022-05-18 14:51:05 UTC
Created attachment 135125 [details] [review]
Bug 30275: DBIC Schema Changes

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 174 Martin Renvoize 2022-05-18 14:51:11 UTC
Created attachment 135126 [details] [review]
Bug 30275: Record renewals

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 175 Martin Renvoize 2022-05-18 14:51:16 UTC
Created attachment 135127 [details] [review]
Bug 30275: DBIC Schema Additions

Add checkout and old_checkout relations to CheckoutRenewal schema and
mark 'seen' as a boolean.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 176 Martin Renvoize 2022-05-18 14:51:24 UTC
Created attachment 135128 [details] [review]
Bug 30275: Add Koha::Objects for Renewals

Add Koha::Checkouts::Renewals|Renewal classes

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 177 Martin Renvoize 2022-05-18 14:51:32 UTC
Created attachment 135129 [details] [review]
Bug 30275: Rename issues.renewals to issues.renewals_count

Rename the issues.renewals field to renewals_count to prevent a method
name collision with the new relation accessor introduced by this
patchset.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 178 Martin Renvoize 2022-05-18 14:51:39 UTC
Created attachment 135130 [details] [review]
Bug 30275: renewals_count DBIC Update

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 179 Martin Renvoize 2022-05-18 14:51:47 UTC
Created attachment 135131 [details] [review]
Bug 30275: Add 'renewals' relation to Issue Schema

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 180 Martin Renvoize 2022-05-18 14:51:55 UTC
Created attachment 135132 [details] [review]
Bug 30275: Add renewals relation to Koha::Checkout

Add the new 'renewals' relation to Koha::Checkout to return a list of
Koha::Checkouts::Renewal objects.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 181 Martin Renvoize 2022-05-18 14:52:03 UTC
Created attachment 135133 [details] [review]
Bug 30275: Add `/api/v1/checkouts/{checkout_id}/renewals`

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 182 Martin Renvoize 2022-05-18 14:52:11 UTC
Created attachment 135134 [details] [review]
Bug 30275: Add alias to create renewal in api routes

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 183 Martin Renvoize 2022-05-18 14:52:20 UTC
Created attachment 135135 [details] [review]
Bug 30275: Fix checkouts.t unit test

We no longer require a mocked userenv for these tests to pass, we're
setting the userenv in api auth now. The mock just serves to break tests
for the renew method now that AddRenewal required a correctly set
userenv for 'number'.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 184 Martin Renvoize 2022-05-18 14:52:30 UTC
Created attachment 135136 [details] [review]
Bug 30275: Add basic unit test for fetching renewals

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 185 Martin Renvoize 2022-05-18 14:52:38 UTC
Created attachment 135137 [details] [review]
Bug 30275: (follow-up) Rebase fixes

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 186 Martin Renvoize 2022-05-18 14:52:47 UTC
Created attachment 135138 [details] [review]
Bug 30275: Add renewals relation to Koha::Old::Checkout

Add the new 'renewals' relation to Koha::Old::Checkout to return a
list of Koha::Checkouts::Renewal objects.

We also add the same relation to the OldIssue schema inline.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 187 Martin Renvoize 2022-05-18 14:52:57 UTC
Created attachment 135139 [details] [review]
Bug 30275: (QA follow-up) Rename columns to match API

This patch performs the following column renames:

* id => renewal_id
* issue_id => checkout_id

The idea is that no translation is needed for the API, and also, being a
new table, we can educate the users into the 'to be' terminology we are
leaning towards, instead of having them learn one naming to create
reports and then need to translate them once we normalize things in a
future.

That said, this is simple to review.

Apply this patch and repeat the test plan.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 188 Martin Renvoize 2022-05-18 14:53:04 UTC
Created attachment 135140 [details] [review]
Bug 30275: (follow-up) Drop renewer_id constraint

This patch fixes some unit tests by ensureing we set a valid userid for
mock userenv setting so that the foreign key constraint doesn't fail and
it also removes the exception class and check for renewer_id from the
store method as, for example with autorenewals, the renewal may not have
been triggered by a actual user.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 189 Martin Renvoize 2022-05-18 14:53:11 UTC
Created attachment 135141 [details] [review]
Bug 30275: Add unit tests for AddRenewal addition

This patch adds a test for the AddRenewal addition that creates Renewal
lines.

Test plan
1) Run the unit tests and confirm it passes

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 190 Martin Renvoize 2022-05-18 14:53:17 UTC
Created attachment 135142 [details] [review]
Bug 30275: Add Unit test for renewals relation

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 191 Martin Renvoize 2022-05-18 14:53:23 UTC
Created attachment 135143 [details] [review]
Bug 30275: Unit Tests for Checkouts::Renewal

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 192 Martin Renvoize 2022-05-18 14:56:36 UTC
(In reply to Jonathan Druart from comment #170)
> Please run the QA scripts, there are tiny issues to fix.
> 
> There are also several tests that are failing.

QA Script re-run... I've fixed the executable bit issue, and fixed up the touched lines where the script detected tabs (as discussed on IRC, I fixed those up, but the rest of the file is still tabbed)

The git manip in this case I feel is helpful in the history to be able to follow the thought process.. I could possibly merge it and add a not to the commit merged.. but I've not delved into it yet.

POD issue is just the standard koha_object_class stuff we add in all Schema files.

Finally..  I couldn't replicate any unit test failures.. for me they all pass first time (after a reset) and subsequent runs also pass too :?
Comment 193 Jonathan Druart 2022-05-19 06:25:25 UTC
(In reply to Martin Renvoize from comment #192)
> Finally..  I couldn't replicate any unit test failures.. for me they all
> pass first time (after a reset) and subsequent runs also pass too :?

Hum, confirmed. Cannot recreate today. Certainly something wrong with my DB yesterday.
Comment 194 Tomás Cohen Arazi 2022-05-19 11:05:30 UTC
(In reply to Jonathan Druart from comment #193)
> (In reply to Martin Renvoize from comment #192)
> > Finally..  I couldn't replicate any unit test failures.. for me they all
> > pass first time (after a reset) and subsequent runs also pass too :?
> 
> Hum, confirmed. Cannot recreate today. Certainly something wrong with my DB
> yesterday.

Maybe worth adding a test for 2022-05-18? Kidding
Comment 195 Martin Renvoize 2022-07-05 12:36:25 UTC
Created attachment 137146 [details] [review]
Bug 30275: Add checkout_renewals table

This patch adds the new checkout_renewals table using an atomicupdate

Sponsored-by: Loughborough University
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 196 Martin Renvoize 2022-07-05 12:36:30 UTC
Created attachment 137147 [details] [review]
Bug 30275: Generated kohastructure.sql

This kohastructure update was generated using `koha-dump --schema-only`
in koha-testing-docker once the atomicupdate had been run against the
previous atomicupdate patch.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 197 Martin Renvoize 2022-07-05 12:36:36 UTC
Created attachment 137148 [details] [review]
Bug 30275: DBIC Schema Changes

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 198 Martin Renvoize 2022-07-05 12:36:41 UTC
Created attachment 137149 [details] [review]
Bug 30275: Record renewals

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 199 Martin Renvoize 2022-07-05 12:36:46 UTC
Created attachment 137150 [details] [review]
Bug 30275: DBIC Schema Additions

Add checkout and old_checkout relations to CheckoutRenewal schema and
mark 'seen' as a boolean.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 200 Martin Renvoize 2022-07-05 12:36:52 UTC
Created attachment 137151 [details] [review]
Bug 30275: Add Koha::Objects for Renewals

Add Koha::Checkouts::Renewals|Renewal classes

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 201 Martin Renvoize 2022-07-05 12:36:58 UTC
Created attachment 137152 [details] [review]
Bug 30275: Rename issues.renewals to issues.renewals_count

Rename the issues.renewals field to renewals_count to prevent a method
name collision with the new relation accessor introduced by this
patchset.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 202 Martin Renvoize 2022-07-05 12:37:03 UTC
Created attachment 137153 [details] [review]
Bug 30275: renewals_count DBIC Update

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 203 Martin Renvoize 2022-07-05 12:37:09 UTC
Created attachment 137154 [details] [review]
Bug 30275: Add 'renewals' relation to Issue Schema

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 204 Martin Renvoize 2022-07-05 12:37:14 UTC
Created attachment 137155 [details] [review]
Bug 30275: Add renewals relation to Koha::Checkout

Add the new 'renewals' relation to Koha::Checkout to return a list of
Koha::Checkouts::Renewal objects.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 205 Martin Renvoize 2022-07-05 12:37:19 UTC
Created attachment 137156 [details] [review]
Bug 30275: Add `/api/v1/checkouts/{checkout_id}/renewals`

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 206 Martin Renvoize 2022-07-05 12:37:25 UTC
Created attachment 137157 [details] [review]
Bug 30275: Add alias to create renewal in api routes

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 207 Martin Renvoize 2022-07-05 12:37:30 UTC
Created attachment 137158 [details] [review]
Bug 30275: Fix checkouts.t unit test

We no longer require a mocked userenv for these tests to pass, we're
setting the userenv in api auth now. The mock just serves to break tests
for the renew method now that AddRenewal required a correctly set
userenv for 'number'.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 208 Martin Renvoize 2022-07-05 12:37:35 UTC
Created attachment 137159 [details] [review]
Bug 30275: Add basic unit test for fetching renewals

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 209 Martin Renvoize 2022-07-05 12:37:41 UTC
Created attachment 137160 [details] [review]
Bug 30275: (follow-up) Rebase fixes

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 210 Martin Renvoize 2022-07-05 12:37:47 UTC
Created attachment 137161 [details] [review]
Bug 30275: Add renewals relation to Koha::Old::Checkout

Add the new 'renewals' relation to Koha::Old::Checkout to return a
list of Koha::Checkouts::Renewal objects.

We also add the same relation to the OldIssue schema inline.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 211 Martin Renvoize 2022-07-05 12:37:52 UTC
Created attachment 137162 [details] [review]
Bug 30275: (QA follow-up) Rename columns to match API

This patch performs the following column renames:

* id => renewal_id
* issue_id => checkout_id

The idea is that no translation is needed for the API, and also, being a
new table, we can educate the users into the 'to be' terminology we are
leaning towards, instead of having them learn one naming to create
reports and then need to translate them once we normalize things in a
future.

That said, this is simple to review.

Apply this patch and repeat the test plan.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 212 Martin Renvoize 2022-07-05 12:37:57 UTC
Created attachment 137163 [details] [review]
Bug 30275: (follow-up) Drop renewer_id constraint

This patch fixes some unit tests by ensureing we set a valid userid for
mock userenv setting so that the foreign key constraint doesn't fail and
it also removes the exception class and check for renewer_id from the
store method as, for example with autorenewals, the renewal may not have
been triggered by a actual user.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 213 Martin Renvoize 2022-07-05 12:38:04 UTC
Created attachment 137164 [details] [review]
Bug 30275: Add unit tests for AddRenewal addition

This patch adds a test for the AddRenewal addition that creates Renewal
lines.

Test plan
1) Run the unit tests and confirm it passes

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 214 Martin Renvoize 2022-07-05 12:38:10 UTC
Created attachment 137165 [details] [review]
Bug 30275: Add Unit test for renewals relation

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 215 Martin Renvoize 2022-07-05 12:38:15 UTC
Created attachment 137166 [details] [review]
Bug 30275: Unit Tests for Checkouts::Renewal

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 216 Tomás Cohen Arazi 2022-07-05 12:59:12 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!
Comment 217 Martin Renvoize 2022-07-06 15:04:56 UTC
Created attachment 137217 [details] [review]
Bug 30275: (QA follow-up) Fix TestBuilder.t

This patch adds 'CheckoutRenewal.checkout_id' to the list of non-foreign
key relations found in _should_be_fk.
Comment 218 Tomás Cohen Arazi 2022-07-06 15:19:34 UTC
Follow-up pushed to master. Thanks Martin!
Comment 219 Tomás Cohen Arazi 2022-07-12 02:37:21 UTC
Created attachment 137598 [details] [review]
Bug 30275: (QA follow-up) Trivial fix to schema file

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 220 Lucas Gass 2022-08-09 22:16:22 UTC
Enhancement will not be backported to the 22.05.x series
Comment 221 Ere Maijala 2022-12-13 07:42:44 UTC
This introduced a backward compatibility break in the REST API by renaming the renewals field in checkouts to renewals_count. Isn't the idea of a v1 API to keep it backward compatible? Could the renewals field be added back as an alias for renewals_count?
Comment 222 David Cook 2022-12-14 03:20:11 UTC
(In reply to Ere Maijala from comment #221)
> Isn't the idea of a v1 API to keep it backward compatible? 

I think that's the idea although I don't think we've really done that in practice, unfortunately. I suppose one could argue that the v1 API isn't even complete yet...



(In reply to Ere Maijala from comment #221)
> Could the renewals field be added back as an alias for renewals_count?

I don't know the API code well enough, but that sounds like a reasonable idea to me.
Comment 223 Tomás Cohen Arazi 2022-12-14 03:27:20 UTC
(In reply to Ere Maijala from comment #221)
> API to keep it backward compatible? Could the renewals field be added back
> as an alias for renewals_count?

I agree this is annoying. The main reason for the change in the name was to reuse the 'renewals' attribute for x-koha-embed(ding) the renewals.

Not sure what to do. If this is critical for the vuFind integration maintainers we could reconsider.
Comment 224 Ere Maijala 2022-12-14 08:11:00 UTC
(In reply to Tomás Cohen Arazi from comment #223)
> (In reply to Ere Maijala from comment #221)
> > API to keep it backward compatible? Could the renewals field be added back
> > as an alias for renewals_count?
> 
> I agree this is annoying. The main reason for the change in the name was to
> reuse the 'renewals' attribute for x-koha-embed(ding) the renewals.
> 
> Not sure what to do. If this is critical for the vuFind integration
> maintainers we could reconsider.

Fortunately this one is not critical, and since the change had already shipped in a released Koha version, going back could cause even worse confusion. VuFind has been adjusted (see https://github.com/vufind-org/vufind/commit/7d8b08fb43027dfaec2ef8417ba34c8aadcfe2e1), though a new release is needed for everyone to get the fix.

Since renewals will be re-used (and I think for a good function), my suggestion for an alias is not a good one either.

At this point I suppose what's left is a wish to avoid such changes in the future, but if they're needed, at least publish a prominent note about the BC break in release notes.

v1 API being incomplete is not a problem as long as new functionality doesn't break compatibility. And even if the v1 API was considered "alpha" level and subject to change, it's really difficult for an API consumer to manage as they might not even be aware of a Koha upgrade being done.

I understand it's difficult to always stay compatible, and others have failed as well even when they've introduced changes with new API versions.