Bug 37996

Summary: Links created by link_marc_host should contain 773$0 in MARC21
Product: Koha Reporter: Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski>
Component: CatalogingAssignee: Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski>
Status: Failed QA --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: m.de.rooy, martin.renvoize, thibault.keromnes
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:
Circulation function:
Bug Depends on: 29560    
Bug Blocks: 37710    
Attachments: Bug 37996: Add field 773$0 to the link created by add_host_link
Bug 37996: Add unit tests
Bug 37996: Add field 773$0 to the link created by add_host_link
Bug 37996: Add unit tests
Bug 37996: Add field 773$0 to the link created by add_host_link

Description Baptiste Wojtkowski (bwoj) 2024-09-24 11:41:44 UTC
Bug 29560 created a new function link_marc_host which is supposed to bind the fields :
MARC21: 773$0 of the biblio to the 999$c of the bundle biblio
UNIMARC: 461$0 of the biblio to the 001 of the bundle biblio

This does not work for the MARC21
Comment 1 Baptiste Wojtkowski (bwoj) 2024-09-24 12:55:42 UTC
Created attachment 171928 [details] [review]
Bug 37996: Add field 773$0 to the link created by add_host_link

Bug 29560 created a new function link_marc_host which is supposed to bind the fields :
MARC21: 773$0 of the biblio to the 999$c of the bundle biblio
UNIMARC: 461$0 of the biblio to the 001 of the bundle biblio

This does not work for the MARC21

TEST PLAN:
1 - Apply the patch containing tests
2 - Run test in t/db_dependent/Koha/Biblio.t, they should fail on two tests
3 - Create a bundle on a biblio a
4 - Add an object to a bundle of a
5 - Check the field 773$0 -> it should be empty
6 - Apply patch
7 - Re-run tests
8 - Repeat 4&5 -> 773$0 should contain the biblionumber of a
Comment 2 Baptiste Wojtkowski (bwoj) 2024-09-24 12:56:10 UTC
Created attachment 171929 [details] [review]
Bug 37996: Add unit tests
Comment 3 Baptiste Wojtkowski (bwoj) 2024-09-24 12:56:12 UTC
Created attachment 171930 [details] [review]
Bug 37996: Add field 773$0 to the link created by add_host_link

Bug 29560 created a new function link_marc_host which is supposed to bind the fields :
MARC21: 773$0 of the biblio to the 999$c of the bundle biblio
UNIMARC: 461$0 of the biblio to the 001 of the bundle biblio

This does not work for the MARC21

TEST PLAN:
1 - Apply the patch containing tests
2 - Run test in t/db_dependent/Koha/Biblio.t, they should fail on two tests
3 - Create a bundle on a biblio a
4 - Add an object to a bundle of a
5 - Check the field 773$0 -> it should be empty
6 - Apply patch
7 - Re-run tests
8 - Repeat 4&5 -> 773$0 should contain the biblionumber of a
Comment 4 Thibault Keromnès 2025-01-13 13:04:08 UTC
Created attachment 176431 [details] [review]
Bug 37996: Add unit tests

Signed-off-by: Thibault Keromnes <thibault.keromnes@univ-paris8.fr>
Comment 5 Thibault Keromnès 2025-01-13 13:04:10 UTC
Created attachment 176432 [details] [review]
Bug 37996: Add field 773$0 to the link created by add_host_link

Bug 29560 created a new function link_marc_host which is supposed to bind the fields :
MARC21: 773$0 of the biblio to the 999$c of the bundle biblio
UNIMARC: 461$0 of the biblio to the 001 of the bundle biblio

This does not work for the MARC21

TEST PLAN:
1 - Apply the patch containing tests
2 - Run test in t/db_dependent/Koha/Biblio.t, they should fail on two tests
3 - Create a bundle on a biblio a
4 - Add an object to a bundle of a
5 - Check the field 773$0 -> it should be empty
6 - Apply patch
7 - Re-run tests
8 - Repeat 4&5 -> 773$0 should contain the biblionumber of a

Signed-off-by: Thibault Keromnes <thibault.keromnes@univ-paris8.fr>
Comment 6 Katrin Fischer 2025-01-14 11:24:50 UTC
773$0 use like in EasyAnalytics is not following the MARC21 standard:
https://www.loc.gov/marc/bibliographic/concise/bd773.html

I am not sure if this has any consequences, but wanted to document it.
It's a Koha specific behavior since I believe the standard has no way to link a record to an item (record to record links use $w and $0 is often used for a record to authority link)
Comment 7 Marcel de Rooy 2025-02-21 10:51:40 UTC
Martin: Could you have a look? Is this intended? See also remark of Katrin.
Comment 8 Martin Renvoize (ashimema) 2025-02-21 12:58:19 UTC
I agree with Katrin, this is going against the MARC21 spec and was deliberately not added in the original implementation (or the methods that we based this off that predate the bug).

I'm not against the link per-say but it should be tied to the EasyAnalytics preference in my opinion and only get added if EasyAnalytics is enabled.
Comment 9 Marcel de Rooy 2025-02-24 07:47:39 UTC
Please have another look with the last comments in mind.
Comment 10 Baptiste Wojtkowski (bwoj) 2025-03-12 08:19:52 UTC
I don't get the point with EasyAnalyticalRecords, shouldn't it be DISABLED if EasyAnalyticalRecords is Enabled ?
Comment 11 Baptiste Wojtkowski (bwoj) 2025-03-21 13:13:08 UTC
+ could you tell me if this would have an impact on Bug 37710 ?