Skip to content

Commit

Permalink
Map title of subseries for alternateGraphicRepresentation if no maint…
Browse files Browse the repository at this point in the history
…itle is given #1879
  • Loading branch information
TobiasNx committed Sep 6, 2023
1 parent 2934727 commit 224784c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions src/main/resources/alma/fix/titleRelatedFields.fix
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,14 @@ do list(path:"alternateGraphicRepresentation[]","var":"$AGR")
remove_field("$AGR.record.@titleOfSubSeries")
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
if exists("$AGR.record.@titleOfSubSeries_n") # separate subvolume numbering and title with :
prepend("$AGR.record.@titleOfSubSeries_p", ": ")
end

paste("$AGR.record.title", "$AGR.record.@titleOfSubSeries_n", "$AGR.record.@titleOfSubSeries_p", join_char: "")
remove_field("$AGR.record.@titleOfSubSeries_n")
remove_field("$AGR.record.@titleOfSubSeries_p")
end
end

Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/alma-fix/990202474680206441.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"label" : "Katakana"
},
"record" : {
"@titleOfSubSeries_p" : "ゼンジン キョウイクロン"
"title" : "ゼンジン キョウイクロン"
}
} ],
"almaMmsId" : "990202474680206441",
Expand Down

0 comments on commit 224784c

Please sign in to comment.