Bug 20364 - Show languages from MARC21 field 041 in intranet
Summary: Show languages from MARC21 field 041 in intranet
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: MARC Bibliographic data support (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: paxed
QA Contact: Testopia
URL:
Keywords: Academy
Depends on:
Blocks: 23783 25082
  Show dependency treegraph
 
Reported: 2018-03-09 10:36 UTC by paxed
Modified: 2020-11-30 21:44 UTC (History)
7 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This patch adds language data from the 041 field of bibliographic records to both the search results and details pages of the staff client.
Version(s) released in:
19.11.00


Attachments
Bug 20364: Show languages from MARC21 field 041 in intranet (49.26 KB, patch)
2018-03-09 10:38 UTC, paxed
Details | Diff | Splinter Review
Bug 20364: Show languages from MARC21 field 041 in intranet (49.23 KB, patch)
2018-03-28 03:34 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 20364: Follow up to correct koha qa test tool failure (4.03 KB, patch)
2018-03-28 03:35 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 20364: Show languages from MARC21 field 041 in intranet (49.87 KB, patch)
2018-10-03 04:34 UTC, paxed
Details | Diff | Splinter Review
Bug 20364: Show languages from MARC21 field 041 in intranet (49.80 KB, patch)
2019-06-06 06:16 UTC, paxed
Details | Diff | Splinter Review
Bug 20364: Show languages from MARC21 field 041 in intranet (49.83 KB, patch)
2019-06-20 10:26 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 20364: Show languages from MARC21 field 041 in intranet (49.97 KB, patch)
2019-07-06 15:10 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 paxed 2018-03-09 10:36:28 UTC
The encoded languages from MARC21 field 041 are not shown anywhere. These are quite important for example DVD video material (subtitle languages).
Comment 1 paxed 2018-03-09 10:38:04 UTC Comment hidden (obsolete)
Comment 2 Mark Tompsett 2018-03-28 03:34:59 UTC
Created attachment 73363 [details] [review]
Bug 20364: Show languages from MARC21 field 041 in intranet

Show the language names coded in field 041, in intranet search
results and in detail view.

Test plan:
1) Apply patch
2) Do a search, and check the results look correct
3) Check some biblio detail pages that they look correct
4) Add some 041 subfields (a, b, d, h, j) in any combinations
5) Repeat 2 and 3

Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi>
Comment 3 Mark Tompsett 2018-03-28 03:35:01 UTC
Created attachment 73364 [details] [review]
Bug 20364: Follow up to correct koha qa test tool failure

Plus, improve the perlcritic level beyond minimal.

TEST PLAN
---------
1) apply first patch
2) run the script in a koha shell output to before.xml
3) run koha qa test tools
   -- script will fail.
4) perlcritic -3 on script is noisy.
5) apply this patch
6) run the script in a koha shell output to after.xml
7) a diff of these two output files should be identical
8) run koha qa test tools
   -- script will now pass
9) perlcritic -3 on script is OK.
Comment 4 paxed 2018-10-03 04:34:14 UTC
Created attachment 79858 [details] [review]
Bug 20364: Show languages from MARC21 field 041 in intranet

Show the language names coded in field 041, in intranet search
results and in detail view.

Incorporated the QA fixes by M. Tompsett in this patch.

Test plan:
1) Apply patch
2) Do a search, and check the results look correct
3) Check some biblio detail pages that they look correct
4) Add some 041 subfields (a, b, d, h, j) in any combinations
5) Repeat 2 and 3
Comment 5 Marie-Luce Laflamme 2019-05-31 19:18:14 UTC
Patch doesn't apply.

The patch seems to erase all the record information in the Normal view tab.

Title, author and contributor names, publisher, material type, description and other fields all disappear.

Only the item information is displayed on screen (item, call number, status, location and barcode).
Comment 6 paxed 2019-06-06 06:16:03 UTC
Created attachment 90347 [details] [review]
Bug 20364: Show languages from MARC21 field 041 in intranet

Show the language names coded in field 041, in intranet search
results and in detail view.

Test plan:
1) Apply patch
2) Do a search, and check the results look correct
3) Check some biblio detail pages that they look correct
4) Add some 041 subfields (a, b, d, h, j) in any combinations
5) Repeat 2 and 3
Comment 7 Martin Renvoize 2019-06-20 10:25:26 UTC
Adding Marcel to the CC list as my 'go to xslt guy'.  Changes look sound to me so far.
Comment 8 Martin Renvoize 2019-06-20 10:26:47 UTC
Created attachment 90845 [details] [review]
Bug 20364: Show languages from MARC21 field 041 in intranet

Show the language names coded in field 041, in intranet search
results and in detail view.

Test plan:
1) Apply patch
2) Do a search, and check the results look correct
3) Check some biblio detail pages that they look correct
4) Add some 041 subfields (a, b, d, h, j) in any combinations
5) Repeat 2 and 3

Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 9 Katrin Fischer 2019-07-06 15:10:38 UTC
Created attachment 91394 [details] [review]
Bug 20364: Show languages from MARC21 field 041 in intranet

Show the language names coded in field 041, in intranet search
results and in detail view.

Test plan:
1) Apply patch
2) Do a search, and check the results look correct
3) Check some biblio detail pages that they look correct
4) Add some 041 subfields (a, b, d, h, j) in any combinations
5) Repeat 2 and 3

Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 10 Katrin Fischer 2019-07-06 15:12:22 UTC
I am not totally fond of the ending . on the fields, but as there can be multiple labels on the same line, I can see why they were put there. Something to work later maybe. 

Also: There is no mention of the maintenance script in the commit message. Wondering how we can document this best.
Comment 11 Martin Renvoize 2019-07-15 11:21:34 UTC
Nice work!

Pushed to master for 19.11.00
Comment 12 Fridolin Somers 2019-08-06 13:14:03 UTC
Enhancement not pushed to 19.05.x
Comment 13 Pablo AB 2020-04-06 01:51:40 UTC
When 041 $a (Language code of text/sound track or separate title) is associated with the LANG authorized value list, then the detail view of the record (OPAC and Intranet) show an "Unknown language code", even if the value of the subfield is a valid language code. This text comes from MARC21Languages.xsl.

This behavior was expected?
Comment 14 Katrin Fischer 2020-04-06 06:16:12 UTC
(In reply to Pablo AB from comment #13)
> When 041 $a (Language code of text/sound track or separate title) is
> associated with the LANG authorized value list, then the detail view of the
> record (OPAC and Intranet) show an "Unknown language code", even if the
> value of the subfield is a valid language code. This text comes from
> MARC21Languages.xsl.
> 
> This behavior was expected?

Hm, I think I know why that happens: When you link an authorised value to a field in cataloguing, Koha will manipulate the XML and switch the codes for the descriptions. So then we end up with an 'unknown language code'. Maybe we could change up the XSLT so it displays the 'code' if it can't locate a matching description. Could you file a new bug? This has been released, so we need a new bug number to work on this. They can be linked using the 'depends'.