[Koha-bugs] [Bug 26055] Advanced Editor Rancor should use "visibility" and not "mandatory" for drawing new records

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Jul 27 02:37:12 CEST 2020


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

--- Comment #5 from David Cook <dcook at prosentient.com.au> ---
(In reply to Andrew Fuerste-Henry from comment #3)
> This highlights a broader issue of how Rancor's relationship to frameworks
> is confusingly vague compared to the regular editor's relationship to
> frameworks.

Agreed

(In reply to Katrin Fischer from comment #4)
> I agree a new
> checkbox would be a good option and relabelling "editor" to make clear what
> applies to which.

While a new checkbox sounds like a good idea, it is easier said than done. 

Here's some comments on the current mapping from
./Koha/Filter/MARC/ViewPolicy.pm:

# marc_subfields_structure.hidden
# allows you to select from 19 possible visibility conditions, 17 of which are
implemented. They are the following:
# -9 => Future use
# -8 => Flag
# -7 => OPAC !Intranet !Editor Collapsed
# -6 => OPAC Intranet !Editor !Collapsed
# -5 => OPAC Intranet !Editor Collapsed
# -4 => OPAC !Intranet !Editor !Collapsed
# -3 => OPAC !Intranet Editor Collapsed
# -2 => OPAC !Intranet Editor !Collapsed
# -1 => OPAC Intranet Editor Collapsed
# 0 => OPAC Intranet Editor !Collapsed
# 1 => !OPAC Intranet Editor Collapsed
# 2 => !OPAC !Intranet Editor !Collapsed
# 3 => !OPAC !Intranet Editor Collapsed
# 4 => !OPAC Intranet Editor !Collapsed
# 5 => !OPAC !Intranet !Editor Collapsed
# 6 => !OPAC Intranet !Editor !Collapsed
# 7 => !OPAC Intranet !Editor Collapsed
# 8 => !OPAC !Intranet !Editor !Collapsed
# 9 => Future use
# ( ! means 'not visible' or in the case of Collapsed 'not Collapsed')

Firstly, the premise that there are 19 possible visibility conditions is false.
While the "hidden" field is TINYINT(1), the 1 apparently refers to column
padding rather than allowed characters. TINYINT(1) actually allows for values
from -128 to +127. 

Secondly, in theory, 4 options means 16 permutations and 5 options means 25
permutations, but I doubt we want to include the new Rancor option in any of
the existing 16 permutations, so I think we end up with 32 permutations like
below? (Flag not being included in these counts obviously.)

# -16 => OPAC Intranet Editor Collapsed Rancor
# -15 => OPAC Intranet Editor !Collapsed Rancor
# -14 => OPAC Intranet !Editor Collapsed Rancor
# -13 => OPAC Intranet !Editor !Collapsed Rancor
# -12 => OPAC !Intranet Editor Collapsed Rancor
# -11 => OPAC !Intranet Editor !Collapsed Rancor
# -10 => OPAC !Intranet !Editor Collapsed Rancor
# -9 =>  OPAC !Intranet !Editor !Collapsed Rancor

# -8 =>  Flag
# -7 =>  OPAC !Intranet !Editor Collapsed !Rancor
# -6 =>  OPAC Intranet !Editor !Collapsed !Rancor
# -5 =>  OPAC Intranet !Editor Collapsed !Rancor
# -4 =>  OPAC !Intranet !Editor !Collapsed !Rancor
# -3 =>  OPAC !Intranet Editor Collapsed !Rancor
# -2 =>  OPAC !Intranet Editor !Collapsed !Rancor
# -1 =>  OPAC Intranet Editor Collapsed !Rancor
# 0 =>   OPAC Intranet Editor !Collapsed !Rancor
# 1 =>  !OPAC Intranet Editor Collapsed !Rancor
# 2 =>  !OPAC !Intranet Editor !Collapsed !Rancor
# 3 =>  !OPAC !Intranet Editor Collapsed !Rancor
# 4 =>  !OPAC Intranet Editor !Collapsed !Rancor
# 5 =>  !OPAC !Intranet !Editor Collapsed !Rancor
# 6 =>  !OPAC Intranet !Editor !Collapsed !Rancor
# 7 =>  !OPAC Intranet !Editor Collapsed !Rancor
# 8 =>  !OPAC !Intranet !Editor !Collapsed !Rancor

# 9 =>  !OPAC !Intranet !Editor !Collapsed Rancor
# 10 => !OPAC !Intranet !Editor Collapsed Rancor
# 11 => !OPAC !Intranet Editor !Collapsed Rancor
# 12 => !OPAC !Intranet Editor Collapsed Rancor
# 13 => !OPAC Intranet !Editor !Collapsed Rancor
# 14 => !OPAC Intranet !Editor Collapsed Rancor
# 15 => !OPAC Intranet Editor !Collapsed Rancor
# 16 => !OPAC Intranet Editor Collapsed Rancor

It's a shame we didn't go with bitpacking for the "hidden" field. That would've
been so much easier. Or just had separate database fields. 

Does that look right to other people?

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list