diff --git a/admin/checkmarc.pl b/admin/checkmarc.pl index 2283f20fbf..0632cd4703 100755 --- a/admin/checkmarc.pl +++ b/admin/checkmarc.pl @@ -181,6 +181,23 @@ if ($res) { $total++; } +# verify that all of a field's subfields (except the ones explicitly ignore) +# are in the same tab +$sth = $dbh->prepare("SELECT tagfield, frameworkcode, frameworktext, GROUP_CONCAT(DISTINCT tab) AS tabs + FROM marc_subfield_structure + LEFT JOIN biblio_framework USING (frameworkcode) + WHERE tab != -1 + GROUP BY tagfield, frameworkcode, frameworktext + HAVING COUNT(DISTINCT tab) > 1"); +$sth->execute; +my $inconsistent_tabs = $sth->fetchall_arrayref({}); +if (scalar(@$inconsistent_tabs) > 0) { + $total++; + $template->param(inconsistent_tabs => 1); + $template->param(tab_info => $inconsistent_tabs); +} + $template->param(total => $total, ); + output_html_with_http_headers $input, $cookie, $template->output; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/checkmarc.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/checkmarc.tmpl index 81a04cb8a0..dd6e1f6c2b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/checkmarc.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/checkmarc.tmpl @@ -155,6 +155,39 @@ + + + subfields not in same tabs + Not all subfields for the following tags are in the same tab (or marked 'ignored'). + + + + + + + + + + + + + + + + + + + +
CodekDescriptionTagTabs in use
Default framework
+ + + + + OK + all subfields for each tag are in the same tab (or ignored) + + +