Bug 41618

Summary: Add item data in marc returned by the api
Product: Koha Reporter: Shi Yao Wang <shi-yao.wang>
Component: REST APIAssignee: Shi Yao Wang <shi-yao.wang>
Status: Needs Signoff --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: caroline.cyr-la-rose, philippe.blouin, tomascohen
Version: unspecified   
Hardware: All   
OS: All   
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
Bug 41618: Add item metadata in biblios get and list API results
Bug 41618: Add x-koha-embed 'items' flag to preserve default behavior

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