Bug 41031 - Extractor::MARC->new does not check if metadata is a MARC::Record
Summary: Extractor::MARC->new does not check if metadata is a MARC::Record
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Marcel de Rooy
QA Contact: Lucas Gass (lukeg)
URL:
Keywords:
Depends on: 40272
Blocks:
  Show dependency treegraph
 
Reported: 2025-10-16 07:41 UTC by Marcel de Rooy
Modified: 2025-12-01 19:55 UTC (History)
3 users (show)

See Also:
GIT URL:
Initiative type: ---
Sponsorship status: ---
Comma delimited list of Sponsors:
Crowdfunding goal: 0
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
25.11.00
Circulation function:


Attachments
Bug 41031: Add checks on metadata and biblio in Extractor::MARC->new (3.66 KB, patch)
2025-10-16 09:43 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 41031: Fix the subtest check_fixed_length in MARC21.t (2.84 KB, patch)
2025-10-16 09:43 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 41031: Add checks on metadata and biblio in Extractor::MARC->new (3.68 KB, patch)
2025-11-07 12:06 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 41031: Fix the subtest check_fixed_length in MARC21.t (2.85 KB, patch)
2025-11-07 12:06 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 41031: Add checks on metadata and biblio in Extractor::MARC->new (3.73 KB, patch)
2025-11-07 14:57 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review
Bug 41031: Fix the subtest check_fixed_length in MARC21.t (2.90 KB, patch)
2025-11-07 14:57 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Marcel de Rooy 2025-10-16 07:41:50 UTC
See changes in follow-up on bug 40272.
It would not harm to check if the metadata we got, is really a marc record object.
Comment 1 Marcel de Rooy 2025-10-16 09:43:06 UTC
Created attachment 187981 [details] [review]
Bug 41031: Add checks on metadata and biblio in Extractor::MARC->new

Test plan:
Run t/db_dependent/Koha/Biblio/Metadata/Extractor/MARC.t
Verify that addbiblio.pl still opens as expected when modifying an
existing record or adding a new record.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 2 Marcel de Rooy 2025-10-16 09:43:08 UTC
Created attachment 187982 [details] [review]
Bug 41031: Fix the subtest check_fixed_length in MARC21.t

Add test on empty marc object.
Remove MARC21 module and create with parent MARC object.

Test plan:
Run t/db_dependent/Koha/Biblio/Metadata/Extractor/MARC/MARC21.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 3 Owen Leonard 2025-11-07 12:06:06 UTC
Created attachment 189264 [details] [review]
Bug 41031: Add checks on metadata and biblio in Extractor::MARC->new

Test plan:
Run t/db_dependent/Koha/Biblio/Metadata/Extractor/MARC.t
Verify that addbiblio.pl still opens as expected when modifying an
existing record or adding a new record.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 4 Owen Leonard 2025-11-07 12:06:08 UTC
Created attachment 189265 [details] [review]
Bug 41031: Fix the subtest check_fixed_length in MARC21.t

Add test on empty marc object.
Remove MARC21 module and create with parent MARC object.

Test plan:
Run t/db_dependent/Koha/Biblio/Metadata/Extractor/MARC/MARC21.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 5 Lucas Gass (lukeg) 2025-11-07 14:53:58 UTC
No problems here. Works as expected, good test coverage, QA tools are happy. PQA.
Comment 6 Lucas Gass (lukeg) 2025-11-07 14:57:34 UTC
Created attachment 189342 [details] [review]
Bug 41031: Add checks on metadata and biblio in Extractor::MARC->new

Test plan:
Run t/db_dependent/Koha/Biblio/Metadata/Extractor/MARC.t
Verify that addbiblio.pl still opens as expected when modifying an
existing record or adding a new record.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 7 Lucas Gass (lukeg) 2025-11-07 14:57:37 UTC
Created attachment 189343 [details] [review]
Bug 41031: Fix the subtest check_fixed_length in MARC21.t

Add test on empty marc object.
Remove MARC21 module and create with parent MARC object.

Test plan:
Run t/db_dependent/Koha/Biblio/Metadata/Extractor/MARC/MARC21.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 8 Marcel de Rooy 2025-11-08 07:32:04 UTC
(In reply to Lucas Gass (lukeg) from comment #7)
> Signed-off-by: Owen Leonard <oleonard@myacpl.org>
> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Thx Owen and Lucas
Comment 9 Lucas Gass (lukeg) 2025-12-01 19:55:24 UTC
Nice work everyone!

Pushed to main for 25.11