[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 Mar 4 12:00:32 CET 2016


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

           What    |Removed                     |Added
  Attachment #48099|0                           |1
        is obsolete|                            |
  Attachment #48478|0                           |1
        is obsolete|                            |

--- Comment #16 from Marcel de Rooy <m.de.rooy at rijksmuseum.nl> ---
Created attachment 48673
Bug 5404: C4::Koha - remove subfield_is_koha_internal_p

The commit b5ecefd485a75d54a5fa26fff5a0cc890541e2c3
Date:   Mon Feb 3 18:46:00 2003 +0000

had a funny description:
Added function to check if a MARC subfield name is "koha-internal"
(instead of checking it for 'lib' and 'tag' everywhere); temporarily
added to Koha.pm

"Temporarily", since 2003, everything is relative, isn't it? :)

The thing is that GetMarcStructure returns hash like

field_200 => {
    subfield_a => {

The attributes for field_200 can be 'repeatable', 'mandatory', 'tag', 'lib'.
We don't want to loop on these values when looping on subfields.
Since there are just { k => v } with v is a scalar (string), it's easier
to test if we are processing a subfield testing the reference.

At some places, we don't need to test that, we are looping on values
from MARC::Field->subfields which are always valid subfields.

Test plan:
1/ Edit items using the batch item mod tool
2/ display and edit items via the cataloguing module.

You should not see any changes between before and after the patch

Tech notes:
We need to check what we are processing when we loop on 'subfields' from
GetMarcStructure, not from MARC::Field->subfields.

Signed-off-by: Josef Moravec <josef.moravec at gmail.com>

Signed-off-by: Marcel de Rooy <m.de.rooy at rijksmuseum.nl>

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

More information about the Koha-bugs mailing list