]> git.koha-community.org Git - koha.git/commit
Bug 19097: Adjust some GetMarcFromKohaField calls
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Mon, 30 Oct 2023 13:00:01 +0000 (13:00 +0000)
committerKatrin Fischer <katrin.fischer@bsz-bw.de>
Mon, 29 Apr 2024 07:35:47 +0000 (09:35 +0200)
commitd6011d6ae92bf1505719d695aa6715bfc54b4496
treed5bf04ad8dc41d088a05d803390182de721a9d6d
parent7fc5e472512234007a465141cba8b50c9c92f494
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@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
C4/Biblio.pm
C4/Items.pm
Koha/EDI.pm
t/db_dependent/Suggestions.t