Bug 3162 - Authority subfileds definitions and Show/Show Collapsed/Hide option
Summary: Authority subfileds definitions and Show/Show Collapsed/Hide option
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Galen Charlton
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-27 04:17 UTC by Zeno Tajoli
Modified: 2014-12-07 20:03 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Who signed the patch off:
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 Chris Cormack 2010-05-21 01:07:11 UTC


---- Reported by tajoli@cilea.it 2009-04-27 16:17:52 ----

The defintion of visibilty of MARC subfields in the enviroments used
(Opac, Intranet, Editor) is different between MARC Bibliographic framework
[http://<your site>:8080/cgi-bin/koha/admin/biblio_framework.pl]
and Authority framework
[http://<your site>:8080/cgi-bin/koha/admin/authtypes.pl]

In MARC Bibliographic framework to setup this option we use an input box
that accepts values between -7 to 8.
The meaning of the values is explained into the on-line help.
No problems here.

In Authority framework there are 3 List boxes (one for Opac, one for Intranet,
one for Editor).
The CGI with the bug is .../admin/auth_subfields_structure.pl

For example see the defintion of field 035 (on Unimarc or MARC21 default framework):
http://<your site>:8080/cgi-bin/koha/admin/auth_subfields_structure.pl?op=add_form&tagfield=035&authtypecode=

But those 3 values are managed by only one SQL field, auth_subfield_structure.hidden. This field is a tinyint(3) field.

So, when the system tries to save a value like '000', Mysql transform it into '0'. So not all option avaible in the inteface are recoredable into 
auth_subfield_structure.hidden

The defintions of Authority subfields in 
installer/data/mysql/fr-FR/marcflavour/unimarc_complet/Obligatoire/autorites_norme_unimarc.sql
and in 
installer/data/mysql/en/marcflavour/marc21/mandatory/authorities_normal_marc21.sql
still use the scale -7 ... 8

And in fact the CGI for the display
.../opac/opac-authoritiesdetail.pl
.../authorities/detail-biblio-search.pl
.../authorities/detail.pl
still use the scale -7 ... 8
with problems. 

In fact the lines used in 
../opac/opac-authoritiesdetail.pl
.../authorities/detail-biblio-search.pl
.../authorities/detail.pl
to check the value of auth_subfield_structure.hidden are:

$subfield_data{visibility} = "display:none;"
        if (    ($tagslib->{$tag}->{$subfield}->{hidden} % 2 == 1) and $value ne ''
            or ($value eq '' and !$tagslib->{$tag}->{$subfield}->{mandatory})
        );

So the only two values that it is possible to use
are 0 (or every evan value that means 'show all') and -7 (or ever odd value that means hide all).


Well, this the problem.
About solution ?

My proposal is:

-- for tree 3.0 I will write a patch to use the values '0','-5' with
the meanings 'show all' vs 'hide all'.
I select those two values because are just now used into SQL authority default defintions.
So I need to change only the code of  ../admin/auth_subfields_structure.pl,
the help template and display template
No changes in SQL defintion, into others CGI or into SQL authority default defintions.

-- for tree 3.2 I think we need to plan a better system.
Probably use 3 list box is better but we need to decide:
a)Do we do the work with one SQL field or with three fields ?
b)And what about MARC Bibliographic framework
c)And about migration of framework from 3.0 to 3.2 ?

That's all, I think

Bye



---- Additional Comments From gmcharlt@gmail.com 2009-04-27 16:25:37 ----

> -- for tree 3.2 I think we need to plan a better system.
> Probably use 3 list box is better but we need to decide:

I agree that the three dropdown lists is a better UI.

> a)Do we do the work with one SQL field or with three fields ?

I vote for splitting it into three - it will be easier to maintain and less prone to bugs.

> b)And what about MARC Bibliographic framework

I think the same UI for setting the visibility and the same set of database columns should be used for both authority and bibliographic frameworks.

> c)And about migration of framework from 3.0 to 3.2 ?

The updatedatabase.pl part will be easy.  It will be necessary to change the base MARC21 and UNIMARC SQL files as well.




---- Additional Comments From tajoli@cilea.it 2009-05-17 20:51:01 ----

I have send a patch for the problem but only for version 3.0.x



---- Additional Comments From mjr@ttllp.co.uk 2009-06-07 11:42:22 ----

This bug is described as fixed in the release notes for version 3.0.2 in the git tree.




---- Additional Comments From gmcharlt@gmail.com 2009-06-07 17:56:37 ----

Reopening.  Not resolved in HEAD.



---- Additional Comments From tajoli@cilea.it 2009-06-08 15:02:25 ----

I confirm that this bug is open in HEAD but close for 3.0.2
In 3.0.2 I have done only an hack to fix it.
But for 3.2 we need a better (and a more difficult) patch.



---- Additional Comments From tajoli@cilea.it 2009-08-13 13:35:17 ----

I change the Priority, the Version and the Severity of this bug.
I config that for 3.0.x tree is close.

But we still need to work for 3.2 tree




---- Additional Comments From tajoli@cilea.it 2010-02-10 09:16:00 ----

I confirm that this bug is still open in 3.2 tree.
It is close in 3.0 tree.



---- Additional Comments From gmcharlt@gmail.com 2010-02-10 11:11:15 ----

Changing to blocker as it is an issue that is fixed in the maintenance branch but whose fix was not submitted to HEAD.  I intend to forward-port the "hack" from the 3.0.x branch unless Zeno has another patch available for HEAD.



---- Additional Comments From gmcharlt@gmail.com 2010-02-10 11:25:02 ----

Cherry-picked patch from 3.0.x.  This should only be temporary, but for now marking as enhancement and retargetting to 3.4



---- Additional Comments From tajoli@cilea.it 2010-02-10 15:03:22 ----

I confirm that I don't have a good solution for 3.2.
I see the cherry-picking.
OK



--- Bug imported by chris@bigballofwax.co.nz 2010-05-21 01:07 UTC  ---

This bug was previously known as _bug_ 3162 at http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=3162

Actual time not defined. Setting to 0.0
CC member irma@calyx.net.au does not have an account here

Comment 1 Katrin Fischer 2014-05-17 11:27:55 UTC
Zeno, is this still valid? We know have checkboxes for the bibliographic frameworks - but not sure that resolves the problem described here.
Comment 2 Zeno Tajoli 2014-05-19 07:21:36 UTC
(In reply to Katrin Fischer from comment #1)
> Zeno, is this still valid? We know have checkboxes for the bibliographic
> frameworks - but not sure that resolves the problem described here.

Hi Katrin,
in fact this bug is a mix of a bug and a request for a new  feature.

The bug part is fixed, now SQL files for authorities, templates and .pl are coherent.
You can select only 'Show all' (value 0) or 'Hide all' (value -5).

So I close the bug but I open a new bug (12284) for the future develop.