Skip to content

Commit

Permalink
Keep romanized number as alternateGraphicRepresentation.titleOfSubser…
Browse files Browse the repository at this point in the history
…ies_n if not given #1879
  • Loading branch information
TobiasNx committed Sep 6, 2023
1 parent 7b9f7a6 commit f7dc516
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions src/main/resources/alma/fix/titleRelatedFields.fix
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ end

do list(path:"alternateGraphicRepresentation[]","var":"$AGR")
if exists("$AGR.record.@title")
unless exists("$AGR.record.@titleOfSubSeries_n")
copy_field("@titleOfSubSeries_n","$AGR.record.@titleOfSubSeries_n")
end
if exists("$AGR.record.@titleOfSubSeries_n") # separate subvolume numbering and title with :
prepend("$AGR.record.@titleOfSubSeries_p", ": ")
end
Expand All @@ -107,6 +110,9 @@ do list(path:"alternateGraphicRepresentation[]","var":"$AGR")
remove_field("$AGR.record.@titleOfSubSeries_n")
remove_field("$AGR.record.@titleOfSubSeries_p")
elsif exists("$AGR.record.@titleOfSubSeries_p") # We have an appearance where there is no title $a is given as alternateGraphicRepresentation
unless exists("$AGR.record.@titleOfSubSeries_n")
copy_field("@titleOfSubSeries_n","$AGR.record.@titleOfSubSeries_n")
end
if exists("$AGR.record.@titleOfSubSeries_n") # separate subvolume numbering and title with :
prepend("$AGR.record.@titleOfSubSeries_p", ": ")
end
Expand Down
4 changes: 2 additions & 2 deletions src/test/resources/alma-fix/990202474680206441.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"label" : "Japanisch (Kanji, Hiragana und Katakana)"
},
"record" : {
"title" : "小原国芳選集, 全人教育論",
"title" : "小原国芳選集, 3: 全人教育論",
"edition" : [ "第4刷" ],
"contribution" : [ {
"agent" : {
Expand All @@ -20,7 +20,7 @@
"label" : "Katakana"
},
"record" : {
"title" : "ゼンジン キョウイクロン"
"title" : "3: ゼンジン キョウイクロン"
}
} ],
"almaMmsId" : "990202474680206441",
Expand Down

0 comments on commit f7dc516

Please sign in to comment.