Summary: | Move Koha::Biblio->get_marc_* to Koha::Biblio::Metadata | ||
---|---|---|---|
Product: | Koha | Reporter: | Tomás Cohen Arazi (tcohen) <tomascohen> |
Component: | Architecture, internals, and plumbing | Assignee: | Bugs List <koha-bugs> |
Status: | NEW --- | QA Contact: | Testopia <testopia> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | dcook, fridolin.somers, martin.renvoize |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29441 | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Bug Depends on: | 27266, 27268, 29871, 30744, 30918 | ||
Bug Blocks: |
Description
Tomás Cohen Arazi (tcohen)
2021-12-07 12:14:50 UTC
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 |