Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crossref DOI deposit records can be created (and "successfully" submitted) with no DOIs in them #565

Closed
rhigman opened this issue Feb 21, 2024 · 0 comments · Fixed by #627
Assignees
Labels
bug Something isn't working

Comments

@rhigman
Copy link
Member

rhigman commented Feb 21, 2024

While compiling Crossref DOI deposit output, if a work has no DOI, we only raise an error if it's a chapter, not the parent work.

} else if is_chapter {
// `doi_data` element is mandatory for `content_item`, and must contain
// both `doi` element and `resource` (landing page) element
return Err(ThothError::IncompleteMetadataRecord(
DEPOSIT_ERROR.to_string(),
"Missing chapter DOI".to_string(),
));
}

This is because it's permissible to send DOI deposit files without a parent work DOI, e.g. if the only purpose of the submission is to register the chapter DOIs. But if a work has no DOI and also no chapters, we don't flag this, but instead create a DOI deposit file that doesn't contain any DOIs (hence does nothing).

Crossref will happily accept this file, and send a confirmation email which doesn't indicate any failures, just has an empty record_count (as below).

<?xml version="1.0" encoding="UTF-8"?>
<doi_batch_diagnostic status="completed" sp="ds5">
   <submission_id>[...]</submission_id>
   <batch_id>[...]</batch_id>
   <batch_data>
      <record_count>0</record_count>
      <success_count>0</success_count>
      <warning_count>0</warning_count>
      <failure_count>0</failure_count>
   </batch_data>
</doi_batch_diagnostic>

Relevant to #551.

@rhigman rhigman added the bug Something isn't working label Feb 21, 2024
@rhigman rhigman self-assigned this Sep 4, 2024
rhigman added a commit that referenced this issue Sep 10, 2024
Better handling of missing DOIs when outputting Crossref metadata (#551, #565)
@rhigman rhigman closed this as completed Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant