Skip to content

Commit

Permalink
Only add dissolutionDate if record has deleted status
Browse files Browse the repository at this point in the history
This seems to fix: #470 and #468 at least partly.
  • Loading branch information
TobiasNx committed Aug 8, 2023
1 parent df0ad93 commit 4cd2035
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions conf/fix-enriched.fix
Original file line number Diff line number Diff line change
Expand Up @@ -503,8 +503,14 @@ do list(path:"replacedBy[]","var":"$i")
end
end

if any_match("050D.a",".*L.schung.*")
copy_field("050D.a","dissolutionDate")
if any_equal("035E.a","I") # Deprecated records
if any_match("050D.a","^L.*schung.?(\\d{4}-\\d{2}).*")
copy_field("050D.a","dissolutionDate")
else
add_field("dissolutionDate","2099-12-31") # Add dummi date for deleted records that are missing the date.
end

replace_all("dissolutionDate","^L.*schung.?(\\d{4}-\\d{2}).*","$1-01")
end

copy_field("dbsID","librariesOrgID")
Expand All @@ -516,8 +522,6 @@ replace_all("@librariesOrg_link","^(.*)$","https://librarytechnology.org/library
move_field("@librariesOrg_link","sameAs[].$append")


replace_all("dissolutionDate","^L.schung(\\d{4}-\\d{2}).*","$1-01")

if exists("029R.e")
paste("parentOrganization.id","~http://lobid.org/organisations/","029R.e","~#!",join_char:"")
copy_field("029R.a","parentOrganization.label")
Expand Down

0 comments on commit 4cd2035

Please sign in to comment.