Bug 24087

Summary: item's subfields (952|995) must be displayed on tab 10
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: Architecture, internals, and plumbingAssignee: Jonathan Druart <jonathan.druart>
Status: ASSIGNED --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low    
Version: unspecified   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23282
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:

Description Jonathan Druart 2019-11-22 10:33:47 UTC
In the biblio frameworks we let the possibility to select a specific tab to display subfields.
In some part there is code that handles (quite awkwardly) this possibility, but globally Koha is assuming the item's subfields must be in tab 10.

I think it would make sense to simplify/clean the code and enforce that on the UI (framework edition): Hide "tab 10" for any fields != 952|995 and display only "tab 10" for 952|995.
Comment 1 Jonathan Druart 2019-11-22 10:34:36 UTC
For instance, to build the list of item's fields in tools/batchMod.pl

332 foreach my $tag (sort keys %{$tagslib}) { 
333     # loop through each subfield
334     foreach my $subfield (sort keys %{$tagslib->{$tag}}) {
335         next if IsMarcStructureInternal( $tagslib->{$tag}{$subfield} );
336         next if (not $allowAllSubfields and $restrictededition && !grep { $tag . '$' . $subfield eq $_ } @subfieldsToAllow );
337         next if ($tagslib->{$tag}->{$subfield}->{'tab'} ne "10");