Skip to content

Commit

Permalink
Draft moving the hbzId for Articles to containedIn RPB-232
Browse files Browse the repository at this point in the history
Unfortunatly I have no test for this in the test strapi data.
  • Loading branch information
TobiasNx committed Dec 11, 2024
1 parent caf1cac commit 2261c52
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions conf/rpb-titel-to-lobid.fix
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,16 @@ do list_as(citation: "bibliographicCitation[]")
move_field("fullLabel", "bibliographicCitation.$append")
end

# containedIn - For articles we should move hbzId of parent records to containedIn since they are not the article records hbzId

if any_equal("type[]", "Article")
if exists("hbzId")
paste("containedIn[].$append.id","~https://lobid.org/resources/","hbzId","~#!")
remove_field("hbzId")
end
end


uniq("containedIn[]")
join_field("bibliographicCitation", "; ")

Expand Down

0 comments on commit 2261c52

Please sign in to comment.