Bug 38205 - 'bookable' should be queryable on the /items endpoint
Summary: 'bookable' should be queryable on the /items endpoint
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Martin Renvoize (ashimema)
QA Contact: Testopia
URL:
Keywords:
Depends on: 35906
Blocks:
  Show dependency treegraph
 
Reported: 2024-10-18 11:24 UTC by Martin Renvoize (ashimema)
Modified: 2025-05-28 18:36 UTC (History)
3 users (show)

See Also:
GIT URL:
Change sponsored?: ---
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 Martin Renvoize (ashimema) 2024-10-18 11:24:41 UTC
We added further support for bookable on the /biblio/{biblio_id}/items endpoint.. we should really replicate that on the /items endpoint including enhancing the support from just ?bookable= param to the q= param handling.

I also think we should rename from bookable to effective_bookable because that's what the special handling actually uses now.
Comment 1 Martin Renvoize (ashimema) 2024-10-18 11:26:41 UTC
From bug 35906 comment 85

We should support the ?bookable filter on the plain /api/v1/items endpoint too.

Also.. I'm tempted to rename it 'effective_bookable' to more clearly distinguish been effective bookable and localised item bookable fields.

I'd love to see this also taken account of within q= as well as the local param option.. that could be a future follow-up though.
Comment 2 Katrin Fischer 2024-10-18 11:30:59 UTC
I like the idea to follow the pattern with effective_ here. Would it make sense to expose both, the item level information and the combined status from item type and item or is the latter enough really?
Comment 3 Tomás Cohen Arazi (tcohen) 2025-05-28 18:36:58 UTC
I like the idea of having a ?bookable=1 filter in both controller methods.

I don't like the fact the 'effective_*' attributes are returned without an embed. Because we end up answering in chat or support tickets questions about weird 500 errors caused by passing those attributes.

When it is an embed, the docs at least can add `(x-koha-embed)` on the side so consumers know what to expect.