Bug 41889 - /checkouts?checked_in=1 errors when patron_id is null
Summary: /checkouts?checked_in=1 errors when patron_id is null
Status: ASSIGNED
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Lisette Scheer
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-02-19 21:12 UTC by Lisette Scheer
Modified: 2026-02-20 16:41 UTC (History)
2 users (show)

See Also:
GIT URL:
Initiative type: ---
Sponsorship status: ---
Comma delimited list of Sponsors:
Crowdfunding goal: 0
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lisette Scheer 2026-02-19 21:12:58 UTC
To recreate:
Checkout an item to a patron without anonymization and check it back in.

Do a call to your instance (may need to turn on api basic auth and just use your credentials)  that includes the date in question, see that you get a result.

Delete the patron and send the call again, you'll get the error message at the bottom of the comment.

This is a problem with third party report services.

{ktdurl}/api/v1/checkouts?q={"checkout_date":{">": "2026-01-24T00:00:00Z","<": "2026-07-31T00:00:00Z"}}&checked_in=true&_per_page=5000&_page=1&_order_by=checkout_date

Recreated on main, seeing it back at least to old stable. 

{
    "errors": [
        {
            "message": "Expected integer - got null.",
            "path": "/body/0/patron_id"
        },
Comment 1 Lisette Scheer 2026-02-20 15:22:14 UTC
Now I can't recreate on main, but I'm getting a booking related error instead. This might be fixed and my git worktrees were messed up.
Comment 2 Lisette Scheer 2026-02-20 16:41:27 UTC
Recreated on main, working on a patch.