Bug 31286

Summary: Embed see-from headings into bibliographic records export
Product: Koha Reporter: Fridolin Somers <fridolin.somers>
Component: Command-line UtilitiesAssignee: Fridolin Somers <fridolin.somers>
Status: RESOLVED FIXED QA Contact: Victor Grousset/tuxayo <victor>
Severity: enhancement    
Priority: P5 - low CC: lucas, robin, victor
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17385
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28639
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32463
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
This adds a new option `--embed_see_from_headings` to the CLI script `export_records.pl`. It allows to include the see-also headings from the linked authority records in the exported bibliographic records.
Version(s) released in:
24.05.00,23.11.06
Bug Depends on:    
Bug Blocks: 32509    
Attachments: Bug 31286: Embed see-from headings into bibliographic records export
Bug 31286: Embed see-from headings into bibliographic records export
Bug 31286: Embed see-from headings into bibliographic records export
Bug 31286: (QA follow-up): tidy up code

Description Fridolin Somers 2022-08-03 01:16:57 UTC
In misc/export_records.pl add an option to add see-from headings (from authorities 4xx) into bibliographic records export.
Like it is done during record indexing.
Comment 1 Fridolin Somers 2022-08-03 01:31:59 UTC
Created attachment 138520 [details] [review]
Bug 31286: Embed see-from headings into bibliographic records export

In misc/export_records.pl add an option to add see-from headings (from authorities 4xx) into bibliographic records export.
Like it is done during record indexing.

Test plan :
1) Choose a biblio record having a field (for example 650) linked to an authority with a see-form.
2) Export this record without see-from headings :
   misc/export_records.pl --starting_biblionumber=X --ending_biblionumber=X --filename /tmp/record_without.xml --format xml
3) Export this record with see-from headings :
   misc/export_records.pl --starting_biblionumber=X --ending_biblionumber=X --filename /tmp/record_with.xml --format xml --embed_see_from_headings
4) Compare /tmp/record_without.xml and /tmp/record_with.xml
=> you should see two 650, one with main heading and one with see-from heading
Comment 2 Katrin Fischer 2022-10-01 07:58:08 UTC
Please don't forget to set Assignee :)
Comment 3 Chris Cormack 2024-01-08 23:41:48 UTC
Created attachment 160672 [details] [review]
Bug 31286: Embed see-from headings into bibliographic records export

In misc/export_records.pl add an option to add see-from headings (from authorities 4xx) into bibliographic records export.
Like it is done during record indexing.

Test plan :
1) Choose a biblio record having a field (for example 650) linked to an authority with a see-form.
2) Export this record without see-from headings :
   misc/export_records.pl --starting_biblionumber=X --ending_biblionumber=X --filename /tmp/record_without.xml --format xml
3) Export this record with see-from headings :
   misc/export_records.pl --starting_biblionumber=X --ending_biblionumber=X --filename /tmp/record_with.xml --format xml --embed_see_from_headings
4) Compare /tmp/record_without.xml and /tmp/record_with.xml
=> you should see two 650, one with main heading and one with see-from heading

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Comment 4 Victor Grousset/tuxayo 2024-02-08 03:54:00 UTC
Created attachment 161875 [details] [review]
Bug 31286: Embed see-from headings into bibliographic records export

In misc/export_records.pl add an option to add see-from headings (from authorities 4xx) into bibliographic records export.
Like it is done during record indexing.

Test plan :
1) Choose a biblio record having a field (for example 650) linked to an authority with a see-form.
2) Export this record without see-from headings :
   misc/export_records.pl --starting_biblionumber=X --ending_biblionumber=X --filename /tmp/record_without.xml --format xml
3) Export this record with see-from headings :
   misc/export_records.pl --starting_biblionumber=X --ending_biblionumber=X --filename /tmp/record_with.xml --format xml --embed_see_from_headings
4) Compare /tmp/record_without.xml and /tmp/record_with.xml
=> you should see two 650, one with main heading and one with see-from heading

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Comment 5 Victor Grousset/tuxayo 2024-02-08 03:57:50 UTC
Created attachment 161876 [details] [review]
Bug 31286: (QA follow-up): tidy up code
Comment 6 Victor Grousset/tuxayo 2024-02-08 03:58:12 UTC
Works, makes sense, QA script happy, code looks good, passing QA :)
Comment 7 Katrin Fischer 2024-03-25 08:54:12 UTC
Pushed for 24.05!

Well done everyone, thank you!
Comment 8 Fridolin Somers 2024-05-23 08:40:18 UTC
Pushed to 23.11.x for 23.11.06
Comment 9 Lucas Gass 2024-05-28 16:13:08 UTC
Enhancement won't be backported to 23.05.x