From babb2e2b1c55c4c6243ac38d382b0a20bf8598cd Mon Sep 17 00:00:00 2001 From: Petra Maier Date: Mon, 15 Jan 2024 11:22:15 +0100 Subject: [PATCH] Ignore 856 without subfield u for fulltextOnline (#1883) --- .../alma/fix/relatedRessourcesAndLinks.fix | 26 ++++++++++--------- .../resources/alma-fix/99370970534006441.json | 2 -- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/main/resources/alma/fix/relatedRessourcesAndLinks.fix b/src/main/resources/alma/fix/relatedRessourcesAndLinks.fix index aa6c97570..0c5451238 100644 --- a/src/main/resources/alma/fix/relatedRessourcesAndLinks.fix +++ b/src/main/resources/alma/fix/relatedRessourcesAndLinks.fix @@ -272,22 +272,24 @@ end set_array("fulltextOnline[]") do list(path: "8564?", "var":"$i") - unless any_match("$i.u",".*(doi.org|nbn-resolving).*") - if all_equal("$i.z", "kostenfrei") # kostenfrei, added Digitalisierung not only Verlag or Agentur as filter - if all_match("$i.x", "Verlag|Agentur|Digitalisierung") + if exists("$i.u") + unless any_match("$i.u",".*(doi.org|nbn-resolving).*") + if all_equal("$i.z", "kostenfrei") # kostenfrei, added Digitalisierung not only Verlag or Agentur as filter + if all_match("$i.x", "Verlag|Agentur|Digitalisierung") + copy_field("$i.x", "fulltextOnline[].$append.label") + copy_field("$i.u", "fulltextOnline[].$last.id") + end + end + if all_match("$i.x", ".*(Archivierte Online|EZB|Online-Ausg|Resolving-System|Volltext).*") copy_field("$i.x", "fulltextOnline[].$append.label") copy_field("$i.u", "fulltextOnline[].$last.id") end + if all_match("$i.3", "^[vV][oO][lL].*") # Volltext + copy_field("$i.3", "fulltextOnline[].$append.label") + copy_field("$i.u", "fulltextOnline[].$last.id") + end end - if all_match("$i.x", ".*(Archivierte Online|EZB|Online-Ausg|Resolving-System|Volltext).*") - copy_field("$i.x", "fulltextOnline[].$append.label") - copy_field("$i.u", "fulltextOnline[].$last.id") - end - if all_match("$i.3", "^[vV][oO][lL].*") # Volltext - copy_field("$i.3", "fulltextOnline[].$append.label") - copy_field("$i.u", "fulltextOnline[].$last.id") - end - end + end end # doi for fullTextOnline and sameAs diff --git a/src/test/resources/alma-fix/99370970534006441.json b/src/test/resources/alma-fix/99370970534006441.json index dae2e34fe..7f2e511b2 100644 --- a/src/test/resources/alma-fix/99370970534006441.json +++ b/src/test/resources/alma-fix/99370970534006441.json @@ -70,8 +70,6 @@ "fulltextOnline" : [ { "label" : "Archivierte Online-Ressource", "id" : "https://www.edoweb-rlp.de/resource/edoweb:7042958" - }, { - "label" : "Volltext" }, { "id" : "https://nbn-resolving.de/urn:nbn:de:hbz:929:02-edoweb:70429580", "label" : "URN-Link"