[Koha-bugs] [Bug 32801] New: /checkouts?checked_in=1 errors when itemnumber is null

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Feb 2 17:26:45 CET 2023


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32801

            Bug ID: 32801
           Summary: /checkouts?checked_in=1 errors when itemnumber is null
 Change sponsored?: ---
           Product: Koha
           Version: 21.11
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P5 - low
         Component: REST API
          Assignee: koha-bugs at lists.koha-community.org
          Reporter: arthur.suzuki at biblibre.com
                CC: tomascohen at gmail.com

When trying to fetch checked_in checkouts for a borrower, if the old_issues
doesn't have an itemnumber (for example the item was deleted).
It brings a 500 error.

This is a message I got while querying this url :
/api/v1/checkouts?patron_id=13662&checked_in=1

<pre>
{"errors":[{"message":"Expected integer - got
null.","path":"\/0\/item_id"},{"message":"Expected integer - got
null.","path":"\/1\/item_id"},{"message":"Expected integer - got
null.","path":"\/9\/item_id"},{"message":"Expected integer - got
null.","path":"\/12\/item_id"},{"message":"Expected integer - got
null.","path":"\/13\/item_id"},{"message":"Expected integer - got
null.","path":"\/14\/item_id"},{"message":"Expected integer - got
null.","path":"\/15\/item_id"}],"status":200}
</pre>

Querying with itemnumber not null solves the issue :
/api/v1/checkouts?patron_id=13662&checked_in=1&q={"item_id":{"-not_like":"null"}}

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.


More information about the Koha-bugs mailing list