--- Comment #35 from Marcel de Rooy <m.de.r...@rijksmuseum.nl> ---
(In reply to Julian Maurice from comment #33)
> A few comments on the code:
> - I think that the subroutine controlled_indicators doesn't belong in
> Koha::Authority. The FIXME added in C4::AuthoritiesMarc strengthens that
I removed the FIXME and optimized it a bit in the last follow-up.
I thought about where to put this code when developing, and it is somewhat
harder. This translated in putting the essential code in a separate object.
(Parsing the pref and applying its rules on a MARC record should imo not be in
Koha::Authority.) But since the indicators really are determined by the
specific values of a given authority record, I decided to add the main
controlled_indicators method to Koha::Authority.
> - In Koha::Authority::ControlledIndicators, there is a package variable
> $cached_indicators. Maybe this module should use Koha::Cache instead ?
I do not really see the advantage. We do not win time imo by saving the
structure to the L2 cache. We could argue about putting it in L1 only (and
check if we would gain time), but that seems not possible now. Since the
internal structure is kept only during the lifetime of the object, the name
could be misleading. If required, I could rename it.
> Also, I'm not sure if this is a problem, but it seems that there is no way
> to tell Koha to change only one of the two indicators.
I am not sure if I understand this correctly. The current approach with the
pref allows for great flexibility.
If you say e.g. MARC21,100,ind1:auth1 you only copy the first indicator. The
second indicator will be empty when creating a new field or will be taken from
the biblio record when updating/merging.
But if you say e.g. MARC21,830,,ind2:auth2 you only copy the second indicator.
One of the unit tests contains an example where indicators are swapped.
So for UNIMARC you can also make all changes you want by adding specific rules.
In comment27 I proposed to open a new report if we need further refinements for
Hope this helps.
You are receiving this mail because:
You are watching all bug changes.
Koha-bugs mailing list
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/