Bug 24087 - item's subfields (952|995) must be displayed on tab 10
Summary: item's subfields (952|995) must be displayed on tab 10
Status: ASSIGNED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low normal (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-11-22 10:33 UTC by Jonathan Druart
Modified: 2019-11-22 10:35 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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");