[Bug 29652] New: Move Koha::Biblio->get_marc_* to Koha::Biblio::Metadata
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29652 Bug ID: 29652 Summary: Move Koha::Biblio->get_marc_* to Koha::Biblio::Metadata Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: tomascohen@gmail.com QA Contact: testopia@bugs.koha-community.org 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. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29652 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |27266, 27268 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27266 [Bug 27266] Move C4::Biblio::GetMarcAuthors to Koha namespace https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27268 [Bug 27268] Move C4::Biblio::GetMarcNotes to Koha namespace -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29652 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m --- Comment #1 from Fridolin Somers <fridolin.somers@biblibre.com> --- 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 ? -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29652 --- Comment #2 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (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 -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29652 --- Comment #3 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (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' -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29652 Bug 29652 depends on bug 27266, which changed state. Bug 27266 Summary: Move C4::Biblio::GetMarcAuthors to Koha namespace https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27266 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29652 --- Comment #4 from Fridolin Somers <fridolin.somers@biblibre.com> --- (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 ^^ -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29652 --- Comment #5 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (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 -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29652 --- Comment #6 from Fridolin Somers <fridolin.somers@biblibre.com> --- (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. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29652 --- Comment #7 from Fridolin Somers <fridolin.somers@biblibre.com> --- We agreed to remove the marcflavour parameter in dev meeting https://wiki.koha-community.org/wiki/Development_IRC_meeting_5_January_2022 -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29652 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |29871 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29871 [Bug 29871] Remove marcflavour param in Koha::Biblio->get_marc_* -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29652 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com Depends on| |29871 Blocks|29871 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29871 [Bug 29871] Remove marcflavour param in Koha::Biblio->get_marc_notes -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29652 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=29441 -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29652 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |30744 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30744 [Bug 30744] Non-public note is visible in OPAC in Title Notes tab -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29652 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29652 Bug 29652 depends on bug 27268, which changed state. Bug 27268 Summary: Move C4::Biblio::GetMarcNotes to Koha namespace https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27268 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29652 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |30918 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30918 [Bug 30918] Non-public note is visible in OPAC in Title Notes tab -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29652 Bug 29652 depends on bug 30918, which changed state. Bug 30918 Summary: Non-public note is visible in OPAC in Title Notes tab https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30918 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29652 Bug 29652 depends on bug 30744, which changed state. Bug 30744 Summary: Use RecordProcessor in get_marc_notes to ensure non-public notes do not leak https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30744 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to oldstable |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org