Bug 38271

Summary: Missing 008 field in bibliographic records created via EDIFACT
Product: Koha Reporter: Matt Blenkinsop <matt.blenkinsop>
Component: AcquisitionsAssignee: Matt Blenkinsop <matt.blenkinsop>
Status: RESOLVED FIXED QA Contact: Kyle M Hall (khall) <kyle>
Severity: normal    
Priority: P5 - low CC: fridolin.somers, jesse, kyle, lucas, martin.renvoize, mspinney
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.11.00,24.05.06,23.11.11
Circulation function:
Attachments: Bug 38271: Handle missing 008 fields in EDI
Bug 38271: Handle missing 008 fields in EDI
Bug 38271: (QA follow-up) Tidy code
Bug 38271: (QA follow-up) Fix testcritic
Bug 38271: (QA follow-up) Fix testcritic

Description Matt Blenkinsop 2024-10-25 11:18:54 UTC
Bib records created through the EDI process don't always include the 008 field which can cause breakages when connected to discovery systems that require it. We need to set a default field on those records as it is a mandatory MARC field
Comment 1 Matt Blenkinsop 2024-10-25 11:20:51 UTC
Created attachment 173347 [details] [review]
Bug 38271: Handle missing 008 fields in EDI

This patch adds handling to create a default 008 field on MARC records that are missing one when created through EDI.

Test plan:
1) prove t/db_dependent/Koha/EDI.t
Comment 2 Kyle M Hall (khall) 2024-10-25 13:07:50 UTC
Created attachment 173357 [details] [review]
Bug 38271: Handle missing 008 fields in EDI

This patch adds handling to create a default 008 field on MARC records that are missing one when created through EDI.

Test plan:
1) prove t/db_dependent/Koha/EDI.t

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 3 Kyle M Hall (khall) 2024-10-25 13:08:09 UTC
Created attachment 173358 [details] [review]
Bug 38271: (QA follow-up) Tidy code

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 4 Martin Renvoize (ashimema) 2024-10-28 08:29:56 UTC
Upgrading Kyle's SO to a QA.. I'm happy with the code and there's very very few of us our here who understand EDI well enough to QA.
Comment 5 Matt Blenkinsop 2024-10-28 09:36:07 UTC
Created attachment 173442 [details] [review]
Bug 38271: (QA follow-up) Fix testcritic

testcritic was failing due to a 'return undef' so this commit amends that

Test plan:
1) prove t/00-testcritic.t
Comment 6 Matt Blenkinsop 2024-10-28 10:27:19 UTC
Created attachment 173490 [details] [review]
Bug 38271: (QA follow-up) Fix testcritic

testcritic was failing due to a 'return undef' so this commit amends that

Test plan:
1) prove t/00-testcritic.t
Comment 7 Katrin Fischer 2024-10-28 18:20:05 UTC
Happy to see unit tests!
Comment 8 Katrin Fischer 2024-10-29 07:54:46 UTC
Pushed for 24.11!

Well done everyone, thank you!
Comment 9 Lucas Gass (lukeg) 2024-11-22 21:36:13 UTC
Backported to 24.05.x for upcoming 24.05.06
Comment 10 Fridolin Somers 2024-12-13 15:31:40 UTC
Pushed to 23.11.x for 23.11.11
Comment 11 Jesse Maseto 2025-02-03 16:46:43 UTC
Not pushed to LTS. Marked Resolved.

If you feel this should be in LTS please reply with your reason.