Bugzilla – Attachment 66870 Details for
Bug 19261
Never hide biblionumber field in view policy
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19261 - never hide biblionumber field in view policy
Bug-19261---never-hide-biblionumber-field-in-view-.patch (text/plain), 2.11 KB, created by
Fridolin Somers
on 2017-09-06 11:48:46 UTC
(
hide
)
Description:
Bug 19261 - never hide biblionumber field in view policy
Filename:
MIME Type:
Creator:
Fridolin Somers
Created:
2017-09-06 11:48:46 UTC
Size:
2.11 KB
patch
obsolete
>From 29d63557770d2e17ca23bede758d4e72723a95cf Mon Sep 17 00:00:00 2001 >From: Fridolin Somers <fridolin.somers@biblibre.com> >Date: Wed, 6 Sep 2017 13:44:41 +0200 >Subject: [PATCH] Bug 19261 - never hide biblionumber field in view policy > >Since Bug 15870 fields defined as hidden in frameworks are not present in MARC. >Some libraries may have/want field containing biblionumber hidden. >This generates an error in OPAC detail view. > >I propose that field linked to biblionumber is not removed from MARC even if hidden. > >Test plan : >- Use XSLT for OPAC and intranet >- Create a biblio record using default framework >- Go to delail page in OPAC and intranet >- Edit in default framework >- In (sub)field linked to biblionumber, go to Advanced constraints >- Uncheck OPAC and intranet in visibility and save >=> Check delail page in OPAC and intranet >--- > Koha/Filter/MARC/ViewPolicy.pm | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > >diff --git a/Koha/Filter/MARC/ViewPolicy.pm b/Koha/Filter/MARC/ViewPolicy.pm >index e69b730..6826e1b 100644 >--- a/Koha/Filter/MARC/ViewPolicy.pm >+++ b/Koha/Filter/MARC/ViewPolicy.pm >@@ -125,7 +125,8 @@ sub _filter_field { > my $visibility = > $marcsubfieldstructure->{$tag}->{$subtag}->{hidden}; > $visibility //= 0; >- if ( $hide->{$interface}->{$visibility} ) { >+ my $kohafield = $marcsubfieldstructure->{$tag}->{$subtag}->{kohafield} // ''; >+ if ( $hide->{$interface}->{$visibility} && $kohafield ne 'biblio.biblionumber' ) { > > # deleting last subfield doesn't delete field, so > # this detects that case to delete the field. >@@ -145,7 +146,8 @@ sub _filter_field { > # -8 is flagged, and 9/-9 are not implemented. > my $visibility = $marcsubfieldstructure->{$tag}->{q{@}}->{hidden}; > $visibility //= 0; >- if ( $hide->{$interface}->{$visibility} ) { >+ my $kohafield = $marcsubfieldstructure->{$tag}->{q{@}}->{kohafield} // ''; >+ if ( $hide->{$interface}->{$visibility} && $kohafield ne 'biblio.biblionumber' ) { > $result->delete_fields($field); > } > >-- >2.7.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 19261
:
66870
|
66907
|
67444
|
107212
|
107375