Bug 41618 - Add item data in marc returned by the api
Summary: Add item data in marc returned by the api
Status: Needs Signoff
Alias: None
Product: Koha
Classification: Unclassified
Component: REST API (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement
Assignee: Shi Yao Wang
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-01-14 18:39 UTC by Shi Yao Wang
Modified: 2026-01-15 14:35 UTC (History)
3 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
Bug 41618: Add item metadata in biblios get and list API results (3.62 KB, patch)
2026-01-14 19:09 UTC, Shi Yao Wang
Details | Diff | Splinter Review
Bug 41618: Add item metadata in biblios get and list API results (3.62 KB, patch)
2026-01-15 14:35 UTC, Shi Yao Wang
Details | Diff | Splinter Review
Bug 41618: Add x-koha-embed 'items' flag to preserve default behavior (3.94 KB, patch)
2026-01-15 14:35 UTC, Shi Yao Wang
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Shi Yao Wang 2026-01-14 18:39:34 UTC
The export tool in cataloging exports biblios with item data in the 952 field by default. It would be nice if the /biblios api did the same
Comment 1 Shi Yao Wang 2026-01-14 19:09:04 UTC
Created attachment 191440 [details] [review]
Bug 41618: Add item metadata in biblios get and list API results

Test plan:
1- Make an API request to both /biblios and /biblios/{biblio_id}
2- Notice the 952 field for items is missing for both
3- Apply patch
4- Repeat step 1 and notice item metadata is there in 952 field
5- Run `prove t/db_dependent/Koha/Objects/Record/Collections.t`

There should be no side effect to /deleted/biblios or /authorities API
Comment 2 Tomás Cohen Arazi (tcohen) 2026-01-14 20:30:14 UTC
I like this. I would like it to be controlled on the API request by `x-koha-embed: items` though.
Comment 3 Tomás Cohen Arazi (tcohen) 2026-01-14 20:30:43 UTC
oops. Clicked too fast.

I meant for consistency on the API and for not changing behavior.
Comment 4 Shi Yao Wang 2026-01-15 14:35:18 UTC
Created attachment 191496 [details] [review]
Bug 41618: Add item metadata in biblios get and list API results

Test plan:
1- Make an API request to both /biblios and /biblios/{biblio_id}
2- Notice the 952 field for items is missing for both
3- Apply patch
4- Repeat step 1 and notice item metadata is there in 952 field
5- Run `prove t/db_dependent/Koha/Objects/Record/Collections.t`

There should be no side effect to /deleted/biblios or /authorities API
Comment 5 Shi Yao Wang 2026-01-15 14:35:21 UTC
Created attachment 191497 [details] [review]
Bug 41618: Add x-koha-embed 'items' flag to preserve default behavior