Skip to content

Commit

Permalink
feat(es): improve md-quality pipeline to handle multilingual orgs
Browse files Browse the repository at this point in the history
  • Loading branch information
jahow committed Jul 23, 2024
1 parent d711fe1 commit 99485f7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions support-services/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ services:
- '5005:5005'

init-pipeline:
# TODO: ideally this would use the local version of the pipelines instead of the "latest" tag of the docker image
image: geonetwork/geonetwork-ui-tools-pipelines:latest
environment:
ES_HOST: http://elasticsearch:9200
Expand Down
5 changes: 5 additions & 0 deletions tools/pipelines/register-es-pipelines.js
Original file line number Diff line number Diff line change
Expand Up @@ -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++
}
Expand Down

0 comments on commit 99485f7

Please sign in to comment.