https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44307 --- Comment #1 from Alex Buckley <alexbuckley@catalyst.net.nz> --- Created attachment 212673 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=212673&action=edit Bug 44307: Update API to allow for null checkout_date or date_due to be returned when listing checkouts The Koha database schema allows default null values in old_issues.issuedate, and old_issues.date_due, database fields. However, where null values are present, in those database fields then an api call to {url}/api/v1/checkouts?checked_in=true will result in an error. This patch updates the api to allow null values to be returned for those two database fields. To test: Before applying the patch: 1. In Administration->System preference enable the RESTBasicAuth system preference. 2. Checkout an item to a patron 3. Check the item back in 4. In your brower go to {sandbox/ktdurl}/api/v1/checkouts?checked_in=1 5. Observe there is an checkout_date, and due_date, in the JSON response. Also, note down the checkout_id 6. Set both the issuedate, and date_due, to NULL: update old_issues set issuedate = NULL and date_due = NULL where issue_id=<checkout_id from #5>; 7. Repeat step 4 8. Observe an error because "null" values were returned 9. Apply patch Sandbox: In sandbox management Actions->Apply patches Once complete Actions->Build CSS and JS Actions->Restart services KTD: ktd --shell git bz apply 44307 yarn build restart_all 10. Repeat step 4 11. Observe the checkout loads, but now has null checkout_date and due_date values. 12. Sign off On KTD can also run the script: qa to run tests. Sponsored-by: Horowhenua District Council, New Zealand -- You are receiving this mail because: You are watching all bug changes.