Bug 35380 - PUT /biblios/:biblio_id doesn't respect overlay rules
Summary: PUT /biblios/:biblio_id doesn't respect overlay rules
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: REST API (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low major
Assignee: Tomás Cohen Arazi (tcohen)
QA Contact:
URL:
Keywords:
Depends on: 31801
Blocks:
  Show dependency treegraph
 
Reported: 2023-11-21 22:04 UTC by Tomás Cohen Arazi (tcohen)
Modified: 2024-09-05 13:07 UTC (History)
4 users (show)

See Also:
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 Tomás Cohen Arazi (tcohen) 2023-11-21 22:04:19 UTC
Based on bug 31801#c5, this endpoint should, at least, respect the any default rule as defined in the MARC overlay rules.
Comment 1 Jan Kissig 2024-09-05 12:09:24 UTC
I would like to move this forward and try to write a patch. 

Do I understand it right, that f.e. I have a record source (f.e. union catalogue) defined in admin -> record sources. Then I should pass the source id as header param and add it to the ModBiblio call like

ModBiblio( $record, $biblio->id, $frameworkcode, { overlay_context => { source => RECORD_SOURCE_ID } } );

I remember we had a discussion about it but could not built the pieces together..
Comment 2 Tomás Cohen Arazi (tcohen) 2024-09-05 13:07:55 UTC
Jan, thanks stepping up.

The MARC overlay rules' sources are not linked to the 'Record sources' feature (yet). That work still needs to be done.

That said, my understanding is that there are a few options here:

(a) Add an 'API' source to the existing MARC overlay rules valid sources.
(b) Add a way to pick 'Record sources' within the MARC overlay rules feature.
(c) Move the 'MARC overlay rules sources' to the 'Record sources' handling. Having them be 'system defined' and untouchable, and then make the 'MARC overlay rules' feature pick all the options from the 'Record sources'.
(d) Make the API controller at least pass a context to `ModBiblio` so *at least* a fallback overlay rule (*) would be applied.


I think the compromise solution is (d), and the ideal is (c). (a) and (b) would be transition steps towards (c), and I'd avoid them as much as possible.