From 2261c52e78f01c297ce7c2aeab866bfb53ec18f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20B=C3=BClte?= Date: Wed, 11 Dec 2024 15:38:36 +0100 Subject: [PATCH] Draft moving the hbzId for Articles to containedIn RPB-232 Unfortunatly I have no test for this in the test strapi data. --- conf/rpb-titel-to-lobid.fix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/conf/rpb-titel-to-lobid.fix b/conf/rpb-titel-to-lobid.fix index 97be0a6..cca5235 100644 --- a/conf/rpb-titel-to-lobid.fix +++ b/conf/rpb-titel-to-lobid.fix @@ -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", "; ")