diff --git a/scripts/metadata_checks.py b/scripts/metadata_checks.py index a6b8ca15..8dbd44f0 100644 --- a/scripts/metadata_checks.py +++ b/scripts/metadata_checks.py @@ -50,6 +50,30 @@ } ], }, + { + "id": "cern:dissertation/doi-required", + "title": "Dissertation DOI required", + "message": "Dissertations must provide a DOI", + "description": "To submit a dissertation, a DOI must be provided.", + "level": "error", + "condition": { + "type": "comparison", + "left": {"type": "field", "path": "metadata.resource_type.id"}, + "operator": "==", + "right": "publication-dissertation", + }, + "checks": [ + { + "type": "comparison", + "left": { + "type": "field", + "path": "pids.doi.identifier", + }, + "operator": "!=", + "right": "", + } + ], + }, ] }