When you look at the methods code, you notice - It is tied to the Koha::Biblio::Metadata->record - The code branches depending on information that is passed, that is already present at the Koha::Biblio::Metadata object/level (MARCFLAVOUR=schema, the record itself) There should still exist a Koha::Biblio->authors/notes method to retrieve this information at that level, but calling the metadata object methods. This way the caller could do: my $biblio = Koha::Biblios->find( $biblio_id, { prefetch => ['biblio_metadata'] } ); and even save some queries.
I see Bug 27268 kept marcflavour has param : my $marcflavour = $params->{marcflavour}; But other calls fetch syspref value : get_marc_host, get_marc_authors ... We should be consistent. Any reason to keep marcflavour has param ?
(In reply to Fridolin Somers from comment #1) > I see Bug 27268 kept marcflavour has param : > my $marcflavour = $params->{marcflavour}; > > But other calls fetch syspref value : > get_marc_host, get_marc_authors ... > > We should be consistent. > > Any reason to keep marcflavour has param ? I wouldn't keep it
(In reply to Tomás Cohen Arazi from comment #2) > (In reply to Fridolin Somers from comment #1) > > I see Bug 27268 kept marcflavour has param : > > my $marcflavour = $params->{marcflavour}; > > > > But other calls fetch syspref value : > > get_marc_host, get_marc_authors ... > > > > We should be consistent. > > > > Any reason to keep marcflavour has param ? > > I wouldn't keep it I don't even think it should consider the syspref. The syspref would've been considered when setting the 'schema'
(In reply to Tomás Cohen Arazi from comment #3) > I don't even think it should consider the syspref. The syspref would've been > considered when setting the 'schema' Ah but the code of get_marc_*() often contains a "if UNIMARC else ..." because fields number are hardcoded (for example title on 200 in UNIMARC). Only when we will have a Dublin Core schema this will not be needed anymore ^^
(In reply to Fridolin Somers from comment #4) > (In reply to Tomás Cohen Arazi from comment #3) > > I don't even think it should consider the syspref. The syspref would've been > > considered when setting the 'schema' > > Ah but the code of get_marc_*() often contains a "if UNIMARC else ..." > because fields number are hardcoded (for example title on 200 in UNIMARC). > > Only when we will have a Dublin Core schema this will not be needed anymore > ^^ What if the biblio_metadata.schema had UNIMARC and the syspref MARC? I'd say biblio_metadata.schema would be the source for truth, same as with DublinCore. So we don't need to read the syspref in Koha::Biblio::Metadata->authors, we just check $self->schema and do the right thing
(In reply to Tomás Cohen Arazi from comment #5) > > What if the biblio_metadata.schema had UNIMARC and the syspref MARC? > > I'd say biblio_metadata.schema would be the source for truth, same as with > DublinCore. So we don't need to read the syspref in > Koha::Biblio::Metadata->authors, we just check $self->schema and do the > right thing A sure, 100% agreed.
We agreed to remove the marcflavour parameter in dev meeting https://wiki.koha-community.org/wiki/Development_IRC_meeting_5_January_2022