projects
/
koha_fer
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bug: 4263 - Repeatable subfields in items
[koha_fer]
/
C4
/
Biblio.pm
diff --git
a/C4/Biblio.pm
b/C4/Biblio.pm
index
b151d71
..
7eb3124
100644
(file)
--- a/
C4/Biblio.pm
+++ b/
C4/Biblio.pm
@@
-1680,13
+1680,18
@@
sub TransformKohaToMarcOneField {
}
$sth->execute( $frameworkcode, $kohafieldname );
if ( ( $tagfield, $tagsubfield ) = $sth->fetchrow ) {
}
$sth->execute( $frameworkcode, $kohafieldname );
if ( ( $tagfield, $tagsubfield ) = $sth->fetchrow ) {
+ my @values = split(/\s?\|\s?/, $value, -1);
+
+ foreach my $itemvalue (@values){
my $tag = $record->field($tagfield);
if ($tag) {
my $tag = $record->field($tagfield);
if ($tag) {
-
$tag->update( $tagsubfield => $
value );
+
$tag->add_subfields( $tagsubfield => $item
value );
$record->delete_field($tag);
$record->insert_fields_ordered($tag);
$record->delete_field($tag);
$record->insert_fields_ordered($tag);
- } else {
- $record->add_fields( $tagfield, " ", " ", $tagsubfield => $value );
+ }
+ else {
+ $record->add_fields( $tagfield, " ", " ", $tagsubfield => $itemvalue );
+ }
}
}
return $record;
}
}
return $record;