[Koha-bugs] [Bug 19097] Koha to MARC mappings (Part 3): Correct remaining GetMarcFromKohaField and TransformMarcToKoha calls

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Nov 2 08:44:24 CET 2023


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19097

--- Comment #10 from Marcel de Rooy <m.de.rooy at rijksmuseum.nl> ---
Created attachment 158233
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=158233&action=edit
Bug 19097: Adjust some GetMarcFromKohaField calls

We need to:
[1] Remove obsolete framework parameters if any (yes there are).
[2] Check scalar context calls if any (most probably not).

Ad 1:
How to find them? Git grep and look at each hit. You will need the -C
parameter to add a few context lines around the call even.

Found one in C4/Biblio.pm and six in Suggestions.t with ''.
Found one in C4/Items on a second line. Similar one in Koha/EDI.
Note: sub receipt_items in EDI has no unit tests yet.

Also did a few git searches like:
git grep GetMarcFromKohaField | grep -v -P "GetMarcFromKohaField.*;"| grep -P
"GetMarcFromKohaField\s*\("
Note: Seeing still three lines; they are all fine. Last line comes from
testing to trigger the warn.

Ad 2:
Have been looking at each git grep line and did not spot any
scalar context call. Before this report, we had an example in
POD and the Biblio test only.

Try to find them by performing smarter git searches?
Did look again at results for:
git grep GetMarcFromKohaField | grep -v -P
"\)\s*=\s*&?(C4::Biblio::)?GetMarcFromKohaField" | grep -v -P "use "
The tests from this grep are included in the last test plan line.

Test plan:
Read the patch.
Run t/db_dependent/Biblio/TransformHtmlToMarc.t
Run t/db_dependent/Items.t
Run t/db_dependent/Suggestions.t
Run prove t/Biblio2.t t/db_dependent/Biblio.t
t/db_dependent/Filter_MARC_ViewPolicy.t t/db_dependent/Koha/Authorities.t
t/db_dependent/Koha/Biblio/Metadata.t
t/db_dependent/Koha/Filter/EmbedItemsAvailability.t
t/db_dependent/Koha/SearchEngine/Search.t t/db_dependent/XISBN.t

Signed-off-by: Marcel de Rooy <m.de.rooy at rijksmuseum.nl>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list