[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 16:28:25 CET 2016
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5404
--- Comment #7 from Jonathan Druart <jonathan.druart at bugs.koha-community.org> ---
(In reply to Marcel de Rooy from comment #5)
> 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.
Yes, that would be a next step.
> 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.
Not sure it's needed, as the test is very simple.
Where would you move this subroutine?
> 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.
Yes but it works for the moment :) The structure has not changed for years.
> I would propose to test (in the sub):
> [a] skip if the field name matches lib|tab|mandatory|repeatable
Imo, that would make the test less strong and too specific.
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list