From a7f6a693927f87c170dd57d96cde0becdc287c7a Mon Sep 17 00:00:00 2001 From: Olivia Guyot Date: Tue, 23 Jul 2024 11:38:21 +0200 Subject: [PATCH] feat(es): improve md-quality pipeline to handle multilingual orgs --- tools/pipelines/register-es-pipelines.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/pipelines/register-es-pipelines.js b/tools/pipelines/register-es-pipelines.js index 5acb18ccfd..d61d3ea77b 100644 --- a/tools/pipelines/register-es-pipelines.js +++ b/tools/pipelines/register-es-pipelines.js @@ -69,9 +69,14 @@ if(ctx.resourceTitleObject != null && ctx.resourceTitleObject.default != null && if(ctx.resourceAbstractObject != null && ctx.resourceAbstractObject.default != null && ctx.resourceAbstractObject.default != '') { ok++ } +// this checks for single-language Organizations (GN 4.2.2) if(ctx.contact != null && ctx.contact.length > 0 && ctx.contact[0].organisation != null && ctx.contact[0].organisation != '') { ok++ } +// this checks for multilingual Organizations (GN 4.2.3+) +if(ctx.contact != null && ctx.contact.length > 0 && ctx.contact[0].organisationObject != null && ctx.contact[0].organisationObject.default != '') { + ok++ +} if(ctx.contact != null && ctx.contact.length > 0 && ctx.contact[0].email != null && ctx.contact[0].email != '') { ok++ }