Skip to content

Commit

Permalink
Do not overwrite existing hbzId with mapped ones #2095
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiasNx committed Nov 14, 2024
1 parent 853f267 commit 9dff30b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
14 changes: 8 additions & 6 deletions src/main/resources/alma/fix/identifiers.fix
Original file line number Diff line number Diff line change
Expand Up @@ -158,11 +158,13 @@ do list(path:"028??", "var":"$i")
copy_field("$i.a", "stockNumber[].$append")
end

if exists("@inNZ")
copy_field("zdbId","@hbzId")
lookup("@hbzId","zdbId2oldHbzId",delete:"true")
if exists("@hbzId")
paste("deprecatedUri", "~http://lobid.org/resources/", "@hbzId", "~#!", join_char: "")
unless exists("hbzId")
if exists("@inNZ")
copy_field("zdbId","@hbzId")
lookup("@hbzId","zdbId2oldHbzId",delete:"true")
if exists("@hbzId")
paste("deprecatedUri", "~http://lobid.org/resources/", "@hbzId", "~#!", join_char: "")
end
copy_field("@hbzId","hbzId")
end
copy_field("@hbzId","hbzId")
end
4 changes: 2 additions & 2 deletions src/test/resources/alma-fix/990217879290206441.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
} ],
"title" : "The history of Oriental studies",
"almaMmsId" : "990217879290206441",
"hbzId" : "HT018628300",
"deprecatedUri" : "http://lobid.org/resources/HT018628300#!",
"hbzId" : "HT019286510",
"deprecatedUri" : "http://lobid.org/resources/HT019286510#!",
"issn" : [ "24054488" ],
"oclcNumber" : [ "909716357" ],
"zdbId" : "2819760-4",
Expand Down

0 comments on commit 9dff30b

Please sign in to comment.