[Koha-bugs] [Bug 18811] New: Visibility settings inconsistent between framework and authority editor

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Jun 22 11:55:49 CEST 2017


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18811

            Bug ID: 18811
           Summary: Visibility settings inconsistent between framework and
                    authority editor
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: Needs Signoff
          Severity: normal
          Priority: P5 - low
         Component: MARC Authority data support
          Assignee: m.de.rooy at rijksmuseum.nl
          Reporter: m.de.rooy at rijksmuseum.nl
        QA Contact: testopia at bugs.koha-community.org
                CC: jonathan.druart at bugs.koha-community.org,
                    julian.maurice at biblibre.com, nick at bywatersolutions.com
            Blocks: 17380
            Status: ASSIGNED
          Assignee: m.de.rooy at rijksmuseum.nl
                CC: jonathan.druart at bugs.koha-community.org,
                    julian.maurice at biblibre.com, nick at bywatersolutions.com
            Status: Needs Signoff
  Patch complexity: Small patch
            Blocks: 17380

>From Nick Clemens on IRC:

"Worth mentioning - you can't edit the 942 of an authority when creating, but
it appears you can when editing, though you can't save it - confusing as end
user."

We should keep in mind that AddAuthority overwrites 942c when adding or
modifying auth records.

When adding a record: Since you choose the framework, we should not allow to
change 942c here. The current behavior is fine; the field should normally be
hidden via the framework. (We could even enforce it if it would not be hidden?)

When modifying a record: The authorities.pl script (incorrectly) shows hidden
fields when filled (which actually is weird). Since 942c is overwritten, this
is useless. A closer look reveals that the visibility checks in authorities.pl
do not completely correspond with the values used in
auth_subfields_structure.pl.

Auth_subfields_structure offers only two possibilities: 0=Show all and -5=Hide
all. The code in authorities.pl now checks <=-4 or >=5 (probably remains from
older code). Note that the sql install scripts initialize 942c to 8.

The proposed patch adds more consistency between auth_subfields_structure.pl
and authorities.pl. A non-zero value will be interpreted as hidden.

IMPORTANT NOTE: This solution will remove values in hidden fields from the MARC
record. Imo it is theoretically the best solution, but if we do not want to
take that risk, we could also remove the two next statements at line 407 and
423 and add a specific next for 942c (enforcing to always hide it).

--- Comment #1 from Marcel de Rooy <m.de.rooy at rijksmuseum.nl> ---
In the previous comment 942c must be 942a.

--- Comment #2 from Marcel de Rooy <m.de.rooy at rijksmuseum.nl> ---
Created attachment 64314
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64314&action=edit
Bug 18811: Change visibility checks in authorities.pl

The check is now <=-4 or >=5, but the framework uses 0 for Show all and
-5 for Hide all. (Note that sql installer scripts also use 8.)
When modifying an authority, the script also showed hidden fields when
filled, since it did not check the hidden field but only the tab field.

NOTE: The proposed solution restores consistency, but will remove hidden
fields from the MARC record.

Test plan:
[1] Set field 942a to Show all in an authority framework.
[2] Open a new record in this framework and verify that you see 942a.
[3] Edit an existing record in this framework and verify again.
[4] Set field 942a now to Hide all in this framework.
[5] Open a new record in this framework and verify that 942a is hidden.
[6] Edit an existing record in this framework and verify again.

--- Comment #3 from Marcel de Rooy <m.de.rooy at rijksmuseum.nl> ---
Nick, Julian or Jonathan:
Would you have any comment on the *risk* of this solution?

--- Comment #4 from Marcel de Rooy <m.de.rooy at rijksmuseum.nl> ---
(In reply to Marcel de Rooy from comment #3)
> Nick, Julian or Jonathan:
> Would you have any comment on the *risk* of this solution?

This mail did not come through due to a mail problem that specific day.
Second try :)


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17380
[Bug 17380] Cannot edit authorities with authtypecode = default
-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.


More information about the Koha-bugs mailing list