Bug 27943 - MARC21 authorities not support 7XX on display
Summary: MARC21 authorities not support 7XX on display
Status: Needs documenting
Alias: None
Product: Koha
Classification: Unclassified
Component: MARC Authority data support (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement with 6 votes (vote)
Assignee: George Veranis
QA Contact: Katrin Fischer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-12 13:47 UTC by George Veranis
Modified: 2024-01-04 16:10 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Medium patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.11.00


Attachments
Bug 27943: add support for 7XX equal terms on authorities marc21 display (6.83 KB, patch)
2021-07-02 14:42 UTC, George Veranis
Details | Diff | Splinter Review
Bug 27943: add support for 7XX equal terms on authorities marc21 display (6.88 KB, patch)
2022-03-31 13:25 UTC, Frank Hansen
Details | Diff | Splinter Review
Bug 27943: (QA follow-up) Add missing TT filters (1.86 KB, patch)
2022-04-24 11:57 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 27943: (follow-up) Fix unit test, and use systempreference AuthoritySeparator (3.68 KB, patch)
2023-02-20 11:11 UTC, George Veranis
Details | Diff | Splinter Review
Bug 27943: (follow-up) Fix unit test, and use systempreference AuthoritySeparator (3.74 KB, patch)
2023-08-17 08:59 UTC, Biblibre Sandboxes
Details | Diff | Splinter Review
Bug 27943: add support for 7XX equal terms on authorities marc21 display (6.94 KB, patch)
2023-10-14 23:13 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 27943: (QA follow-up) Add missing TT filters (1.91 KB, patch)
2023-10-14 23:13 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 27943: (follow-up) Fix unit test, and use systempreference AuthoritySeparator (3.79 KB, patch)
2023-10-14 23:13 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 27943: (QA follow-up) Perltidy (10.30 KB, patch)
2023-10-14 23:13 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 27943: (QA follow-up) Alternate display in result lists (3.64 KB, patch)
2023-10-14 23:13 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description George Veranis 2021-03-12 13:47:03 UTC
If we add a field of 7XX in a MARC21 authority record, then on authority result the 7XX should shown as = value_of_heading_of_7XX next to the main heading of the authority as equal to that. https://www.loc.gov/marc/authority/ad7xx.html

That enchancement would be very useful for non latin catalogs where have the latin heading and the non latin equal heading. 

example : 
100	0#$aAugustine,$cSaint, Bishop of Hippo
[LAC English heading]
700	05$wa$aAugustin,$csaint, évêque d’Hippone.$0(CaOONL)0053A1978F#
[Corresponding LAC French heading]
Comment 1 George Veranis 2021-07-02 14:42:41 UTC
Created attachment 122549 [details] [review]
Bug 27943: add support for 7XX equal terms on authorities marc21 display

Currently when a MARC21 authority has 7XX field they do not display on
authority search result page. 7XX is equal term of 1XX based on LC rules.
Applying this patch will enable that feature, which is important for non latin
catalogues.

Test plan:
1) Add a new authority with 1XX and 7XX fields.
2) Try to search that authority and check if 7XX values are displayed
3) Apply this patch
4) Try to search that authority and you will see that 7XX values are displayed
   like "1XX = 7XX"

Sponsored-by: Keratsini-Drapetsona Municipal Library, Greece
Mentored-by: Andreas Roussos
Comment 2 Frank Hansen 2022-03-31 13:25:46 UTC
Created attachment 132778 [details] [review]
Bug 27943: add support for 7XX equal terms on authorities marc21 display

Currently when a MARC21 authority has 7XX field they do not display on
authority search result page. 7XX is equal term of 1XX based on LC rules.
Applying this patch will enable that feature, which is important for non latin
catalogues.

Test plan:
1) Add a new authority with 1XX and 7XX fields.
2) Try to search that authority and check if 7XX values are displayed
3) Apply this patch
4) Try to search that authority and you will see that 7XX values are displayed
   like "1XX = 7XX"

Sponsored-by: Keratsini-Drapetsona Municipal Library, Greece
Mentored-by: Andreas Roussos
Signed-off-by: Frank Hansen <frank.hansen@ub.lu.se>

Works for me!
Comment 3 Katrin Fischer 2022-04-24 11:57:41 UTC
Created attachment 133712 [details] [review]
Bug 27943: (QA follow-up) Add missing TT filters
Comment 4 Katrin Fischer 2022-04-24 12:00:59 UTC
I have added a follow-up to fix the missing TT filters, but there are 2 issues that are a bit more than QA can fix:

1) Tests are failing

Changes to any core routines in C4 and Koha need to be accompanied by unit tests per the coding guidelines, but there is a little more here as the existing tests fail with the patches applied:

prove t/db_dependent/AuthoritiesMarc.t

t/db_dependent/AuthoritiesMarc.t .. 2/12 
#   Failed test 'test BuildSummary for MARC21'
#   at t/db_dependent/AuthoritiesMarc.t line 158.
#     Structures begin differing at:
#          $got->{equalterm} = ARRAY(0x563fe77a47f0)
#     $expected->{equalterm} = Does not exist

#   Failed test 'test BuildSummary for UNIMARC'
#   at t/db_dependent/AuthoritiesMarc.t line 202.
#     Structures begin differing at:
#          $got->{equalterm} = ARRAY(0x563fe36e6b00)
#     $expected->{equalterm} = Does not exist
Cannot determine authority type for record: 1710 at /kohadevbox/koha/Koha/SearchEngine/Elasticsearch.pm line 566.
t/db_dependent/AuthoritiesMarc.t .. 12/12 # Looks like you failed 2 tests of 12.
t/db_dependent/AuthoritiesMarc.t .. Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/12 subtests 

Test Summary Report
-------------------
t/db_dependent/AuthoritiesMarc.t (Wstat: 512 Tests: 12 Failed: 2)
  Failed tests:  6, 8
  Non-zero exit status: 2


2) Hardcode delimiter

This hardcodes the delimiter for subheadings to "--", but I believe it should be using the system preference AuthoritySeparator instead.


Please let us know if you need help in fixing those.
Comment 5 Katrin Fischer 2022-04-24 12:01:41 UTC
My testing record had 2 700 fields, as the field is repeatable. It works nicely for display.
Comment 6 George Veranis 2022-04-27 08:57:40 UTC
Hi Katrin, thanks for the review of that bug I will try to do the changes that you proposed . I'm not sure about the unit tests but I will check it to be compatible with that.
Comment 7 George Veranis 2023-02-20 11:11:41 UTC
Created attachment 146945 [details] [review]
Bug 27943: (follow-up) Fix unit test, and use systempreference AuthoritySeparator

Instead of hardcoding the separator we take the value from systempreference.
Also adjust the unit test to expect the "equalterm" array.
Test plan same as before.
Comment 8 Biblibre Sandboxes 2023-08-17 08:59:17 UTC
Created attachment 154502 [details] [review]
Bug 27943: (follow-up) Fix unit test, and use systempreference AuthoritySeparator

Instead of hardcoding the separator we take the value from systempreference.
Also adjust the unit test to expect the "equalterm" array.
Test plan same as before.

Signed-off-by: Christian Nelson <christian.nelson@uwasa.fi>
Comment 9 Katrin Fischer 2023-10-14 23:13:21 UTC
Created attachment 157173 [details] [review]
Bug 27943: add support for 7XX equal terms on authorities marc21 display

Currently when a MARC21 authority has 7XX field they do not display on
authority search result page. 7XX is equal term of 1XX based on LC rules.
Applying this patch will enable that feature, which is important for non latin
catalogues.

Test plan:
1) Add a new authority with 1XX and 7XX fields.
2) Try to search that authority and check if 7XX values are displayed
3) Apply this patch
4) Try to search that authority and you will see that 7XX values are displayed
   like "1XX = 7XX"

Sponsored-by: Keratsini-Drapetsona Municipal Library, Greece
Mentored-by: Andreas Roussos
Signed-off-by: Frank Hansen <frank.hansen@ub.lu.se>

Works for me!

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 10 Katrin Fischer 2023-10-14 23:13:24 UTC
Created attachment 157174 [details] [review]
Bug 27943: (QA follow-up) Add missing TT filters

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 11 Katrin Fischer 2023-10-14 23:13:27 UTC
Created attachment 157175 [details] [review]
Bug 27943: (follow-up) Fix unit test, and use systempreference AuthoritySeparator

Instead of hardcoding the separator we take the value from systempreference.
Also adjust the unit test to expect the "equalterm" array.
Test plan same as before.

Signed-off-by: Christian Nelson <christian.nelson@uwasa.fi>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 12 Katrin Fischer 2023-10-14 23:13:30 UTC
Created attachment 157176 [details] [review]
Bug 27943: (QA follow-up) Perltidy

I have some trouble to get the tidyness test on
AuthoritiesMarc.pm passing. There are several outstanding
patches touching this file, so I didn't dare to perltidy
the whole file just yet.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 13 Katrin Fischer 2023-10-14 23:13:33 UTC
Created attachment 157177 [details] [review]
Bug 27943: (QA follow-up) Alternate display in result lists

The original display put the equivalent heading right after
the main heading with a = as separator. As the 7xx are repeatable
that could get croweded easily, also if the terms are longer
we might see not so nice breakage.

This puts every 7xx on its own line below the main heading
with some indentation.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 14 Tomás Cohen Arazi 2023-10-30 12:03:02 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 15 Fridolin Somers 2023-11-08 08:17:51 UTC
Enhancement not pushed to 23.05.x