Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix fallback for publication dates #2089 #2091

Merged
merged 1 commit into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading