Skip to content

Commit

Permalink
Merge #2091 from branch '2089-pubDate' of github.com:hbz/lobid-resources
Browse files Browse the repository at this point in the history
  • Loading branch information
dr0i committed Nov 7, 2024
2 parents c32cadd + cbb69b7 commit eccffd1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/main/resources/alma/fix/titleRelatedFields.fix
Original file line number Diff line number Diff line change
Expand Up @@ -258,14 +258,14 @@ if exists("publication[].$first")
end
end
end
unless exists("publication[].$first.startDate[]")
unless exists("publication[].$first.startDate")
if any_match("008","^.{6}[brestikm](\\d{4}).*$")
copy_field("008","@008startDate")
replace_all("@008startDate","^.{7}(\\d{4}).*$","$1")
copy_field("@008startDate","publication[].$first.startDate")
end
end
unless exists("publication[].$first.endDate[]")
unless exists("publication[].$first.endDate")
if any_match("008","^.{6}[km]\\d{4}(\\d{4}).*$")
copy_field("008","@008endDate")
replace_all("@008endDate","^.{11}(\\d{4}).*$","$1")
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/alma-fix/99374153235806441.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"otherTitleInformation" : [ "Thüringen" ],
"edition" : [ "1. Auflage" ],
"publication" : [ {
"startDate" : "2088",
"startDate" : "2008",
"type" : [ "PublicationEvent" ],
"location" : [ "München" ],
"publishedBy" : [ "Stark" ]
Expand Down

0 comments on commit eccffd1

Please sign in to comment.