Bug 23235

Summary: Rename Koha::Biblio->metadata with ->marc_xml to avoid ambiguity
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: Architecture, internals, and plumbingAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: tomascohen
Version: unspecified   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34828
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 22700    
Bug Blocks:    

Description Jonathan Druart 2019-06-28 18:17:36 UTC
What about renaming the method in Koha::S::R::Biblio to ->marc_xml_metadata (adding the conditions in it) and Koha::Biblio->metadata to ->marc_xml (make it returns the MARX XML directly)?

See bug 22700 for the discussion.

However it will break (again) the reports people already have.
Comment 1 Tomás Cohen Arazi (tcohen) 2019-06-28 18:19:43 UTC
It should return a Koha::Biblio::Metadata object, which is an envelope containing info about the schema, format, etc. Maybe you mean a method in Koha::Biblio::Metadata
Comment 2 Jonathan Druart 2019-06-28 18:55:14 UTC
The problem IMO is that we have a DB structure to allow 1-N but it's not clear (reading the code) that we support only one.
I think we should have "marc_xml" explicitely written in the name of the subroutine, to make it clear.

Reading the code I'd say that even if you have a biblio_metadata.format with something else than "marcxml", it will be used anyway.