[Koha-bugs] [Bug 5404] C4::Koha::subfield_is_koha_internal_p no longer serves a purpose

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Feb 19 09:58:47 CET 2016


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

Marcel de Rooy <m.de.rooy at rijksmuseum.nl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Signed Off                  |In Discussion

--- Comment #5 from Marcel de Rooy <m.de.rooy at rijksmuseum.nl> ---
QA Comment:
I am not sure if this really is a better solution.
I also doubt about the remark in comment 1 "Apparently older versions of Koha
considered a MARC subfield in the frameworks that had a code longer than one
character to be reserved for internal use". To me it just seems to be a trick
to skip the internal fields lib, tab, mandatory and repeatable (all length>1).

In terms of design it would have been easier to put all subfields a level
deeper instead of on the same level as lib, etc.

I understand about not changing the design of the structure here.
But now we move the test length<>1 from a subroutine into the code and check if
it is a ref or not.
I probably would like to still have the test in the subroutine (with all
benefits of a subroutine); another name would be fine.
If someone wants to add some other property to the structure and suppose that
is an arrayref or a hashref or an object, your test would fail.

I would propose to test (in the sub):
[a] skip if the field name matches lib|tab|mandatory|repeatable
or [b] proceed if the field is a ref called MARC::Field (instead of testing if
ref is true, we test ref eq ..)

Obviously, I agree with removing the call for a loop on only real subfields.

Changing status

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


More information about the Koha-bugs mailing list