Skip to content

Preserve existing DatasetDOI and auto-sync title to DOI metadata #256

Closed

Description

@neuromechanist

Problem

Two gaps in how we handle dataset metadata:

1. Existing DatasetDOI is silently overwritten

During the publish workflow (admin.ts:3436), we unconditionally replace DatasetDOI with the NEMAR concept DOI:

datasetDesc.DatasetDOI = conceptDoi;

If a dataset was imported from another source (e.g., OpenNeuro, Zenodo) and already has a DatasetDOI, that original DOI is lost. It should be preserved as a related identifier.

2. DOI title drifts when BIDS Name changes

When dataset_description.json is updated and LLM enrichment runs (webhooks.ts:666-692), we sync the BIDS Name to:

  • D1 datasets.name
  • GitHub repo description

But we do NOT update the DOI metadata. The DOI title stays as whatever it was at minting time.

Proposed Solution

Preserve existing DatasetDOI

Before overwriting DatasetDOI in the publish workflow:

  1. Check if DatasetDOI already exists and differs from the NEMAR concept DOI
  2. If it exists, append it to SourceDatasets (if not already present):
    "SourceDatasets": [
      { "DOI": "10.xxxx/original-doi" }
    ]
  3. This will automatically flow into DataCite as IsDerivedFrom via existing logic in datacite.ts:1368-1387 and llm-enrich.ts:269-301

Note: We already handle SourceDatasets -> IsDerivedFrom in both the DataCite XML builder and the LLM enrichment seed stage.

Reference: nm000115 has both SourceDatasets and DatasetDOI set correctly.

Auto-sync title to DOI

In the LLM enrichment webhook (webhooks.ts), after syncing the BIDS Name to D1 and GitHub, also update the EZID DOI title if:

  • The dataset has an EZID identifier
  • The new title differs from what's currently on the DOI

Files to modify

  • backend/src/routes/admin.ts - Publish workflow: preserve existing DatasetDOI in SourceDatasets before overwriting
  • backend/src/routes/webhooks.ts - LLM enrichment handler: add EZID title sync after D1/GitHub sync

Activity

  1. added
    enhancement
    on Mar 6, 2026
  2. added 2 commits that reference this issue on Mar 7, 2026
    578569f
    d42d29d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions