Feat/improve datacite workflow#482
Conversation
|
Visit the preview URL for this PR (updated for commit 27ea052): https://cioos-metadata-form-dev-258dc--pr482-feat-improve-data-1991skuv.web.app (expires Fri, 03 Jul 2026 18:09:26 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: c9b6275cb4b6311b719349f5e25e457b5691d09c |
|
@gannej I think I fixed most of the issues brought up during the revision. The only thing I wasn't too sure is how to map the UID to the new DOI. For now it grabs the 8 first characters from the UI and generate DOI suffix from it. |
Thanks! would it be possible to have the first 16 characters instead of the first 8 (this is what we use at the moment)? |
We can certainly do that! My only concern is that resulting format goes a bit agains the datacite recommendations: https://support.datacite.org/docs/doi-basics |
|
One thing I just realized is that the DOI remain in draft on Datacite even when the record is set as published within the metadata form. Should we change the status of the DOI when a record is published? Or we leave the region manager to go to datacite interface and flick the status of the record. @gannej Let me know your thoughts? |
After consulting the data team, we would rather keep the process as is and go on datacite to change The DOI status (draft to public) it will be easier for embargoed data where DOI should not be public yet. |
|
OK I think I will create a option in the admin to define what to do on publish, not everybody have the same needs. We can add a checker to see if the doi is active or not too. |
Perfect! thanks! |
…and adjust tests accordingly
… and adjust catalogue URL retrieval
…pdating region configurations
… update UserProvider for dynamic API domain
- Added DataciteStatusDialog component for managing DOI state transitions during publish/unpublish actions. - Integrated DOI state management into DOIInput component, allowing users to register, publish, or demote DOIs. - Updated Admin component to include DOI status management settings. - Enhanced RecordActions component to handle DOI state transitions with the new dialog. - Updated UserProvider to include new functions for DOI management (publishDoi, registerDoi, hideDoi). - Modified package-lock.json to resolve merge conflicts and ensure proper dependency management.
b465f73 to
fd874e5
Compare
…egrating it into DOIInput
… DOIInput component
|
OK I think I finally took the time to iron out the DOI management here's the general workflow when the form manage the doi status or not DOI WorkflowDOIs are reserved via DataCite directly from the metadata form and follow DataCite's three-state lifecycle: Draft → Registered → Findable. Each region chooses who drives the status transitions through an admin setting, doiStatusManagement, with two modes: Common to both modes
form — "Managed from this form"The DOI's lifecycle state is driven from within the app:
datacite — "Managed via DataCite portal" (default)The form does not drive the DOI's lifecycle state — that's handled externally on the DataCite portal:
In short: form mode makes the entry form the source of truth for DOI state and exposes the full set of transition controls; datacite mode treats the form as create-and-push-metadata only, leaving state changes to the DataCite portal. |
|
I think the only left right now for me is to prevent anyone but admin and reviewers to modify a DOI status and genration. Not sure what are the thoughts at SLGO @gannej |
Datacite DOI creation workflow revision
This PR attempt to fix the different issues brought up by @gannej in the document:
https://docs.google.com/spreadsheets/d/1NH7dltkaiwV1rqhb_e7hUxc_4XFsdTAp8MXia0lz6NM/edit?gid=994908484#gid=994908484
metadata-entry-form
DOI generation uses record UID as suffix — The generated DOI now includes the first 8 characters of
record.recordIDas the DataCite DOI suffix, instead of relying on DataCite's random auto-generation. This makes DOIs deterministic and traceable back to the record.Catalogue URL uses record's primary language — The DOI catalogue URL now uses
record.language(the form's primary language setting) rather than the browser's current UI language, ensuring the DOI always links to the correct language page.Language validation on DOI creation — If no primary language is assigned to the record, DOI operations now throw a clear user-facing error: "Please assign a primary language to the record before creating a DOI."
Region default publisher with ROR — When no contact has the
publisherrole, the region's organization name is used as the default publisher in the DataCite record. Each region now has arorfield inregions.js(pacific, stlaurent, amundsen have ROR IDs; atlantic, canwin, test are pending), and the ROR identifier is included in the DataCite publisher metadata.Publisher visibility in the form — The Contact tab shows an info alert when no contact has the publisher role, indicating the region default will be used. The DOI section shows which publisher is active (contact name or region default).
cioos-metadata-conversion
Fixed
resourceTypemapping —resourceType(biological, oceanographic, other) was lost during Firebase→CIOOS conversion and hardcoded to""in DataCite output. Now correctly passed through and populated.resourceTypeGeneralwas reading from the wrong path (record["metadataScope"]instead ofrecord["metadata"]["scope"]); now fixed.Fixed multilingual title handling — All titles were incorrectly marked as
TranslatedTitle. Now the default language title has notitleType(primary title per DataCite schema), and only other languages getTranslatedTitle.Fixed abstract/description — Only the default language abstract is now included in the DataCite output; translated abstracts are dropped.
Fixed subjects/keywords —
_get_eov_subjectsand_get_keyword_subjectswere reading fromrecord["metadata"](nonexistent path); now correctly read fromrecord["identification"]["keywords"]with both EN and FR keywords included.Enhanced
geoLocationPlace— Now includes vertical extent info (depth/height range in meters) alongside the location description, using the record's default language.Test plan
resourceTypeandresourceTypeGeneralare correctly populated in DataCite outputtitleTypeand the translated title hasTranslatedTitlegeoLocationPlace