https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42998 Bug ID: 42998 Summary: Allow a requested due date when renewing a checkout via the REST API Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: REST API Assignee: koha-bugs@lists.koha-community.org Reporter: martin.renvoize@openfifth.co.uk QA Contact: testopia@bugs.koha-community.org CC: tomascohen@gmail.com Target Milestone: --- Depends on bug 42997 (booking/checkout due date synchronisation). This patch extends the checkout renewal endpoints so API consumers can renew a checkout through to a specific date: - an optional request body may carry a due_date (RFC3339); it is used in place of the due date calculated from the circulation rules and is validated against any bookings for the item via CanBookBeRenewed. When the checkout is linked to a booking, AddRenewal keeps the booking end date in sync (bug 42997) - a new renewal_limit value is accepted in the x-koha-override header, skipping renewal count limits when AllowRenewalLimitOverride is enabled - intended for staff explicitly authorising an extension of a booked loan - the 403 error response now carries the CanBookBeRenewed error as a machine-readable error_code (e.g. 'booked', 'too_many') The requested due date is a body attribute rather than a query parameter or override: the POST creates a renewal resource and the date is data about that renewal. The existing 'seen' query parameter predates the current guidelines and has been left untouched. Both /checkouts/{checkout_id}/renewal and the newer /checkouts/{checkout_id}/renewals route to the same controller, so the body is accepted and documented on both. Test plan: 1. yarn api:bundle && restart_all 2. Run t/db_dependent/api/v1/checkouts.t -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.