Skip to content

797 dataset type selection step v2#955

Draft
jp-tosca wants to merge 6 commits intodevelopfrom
797-dataset-type-selection-step-v2
Draft

797 dataset type selection step v2#955
jp-tosca wants to merge 6 commits intodevelopfrom
797-dataset-type-selection-step-v2

Conversation

@jp-tosca
Copy link
Copy Markdown
Contributor

@jp-tosca jp-tosca commented Apr 11, 2026

What this PR does / why we need it:

Following up on @pdurbin's work in #845, this PR updates how users select the dataset type in the dataset creation flow.

For now, we’ve hardcoded the dataset type descriptions (“dataset” and “review”) as a temporary solution until the new field is added. Update: this was fixed in 7c355f4.

This is the first step toward supporting dataset types in the SPA, more enhancements coming soon.

Storybook links:

Which issue(s) this PR closes:

Depends on

This PR depends on the following backend PR:

Special notes for your reviewer:

Suggestions on how to test this:

You can follow the instructions provided at the end of this script or use this script provided to configure review types in root:

#!/usr/bin/env bash

API_TOKEN="API_TOKEN"

URL="https://raw.githubusercontent.com/IQSS/dataverse/master/scripts/api/data/metadatablocks/review.tsv"
OUTPUT_FILE="review.tsv"

TYPE_URL="https://dataverse-guide--11753.org.readthedocs.build/en/11753/_downloads/c2a076bba578dc93b3582f41d6fba594/review.json"
TYPE_OUTPUT_FILE="review.json"

curl -fL "$URL" -o "$OUTPUT_FILE"
curl -fL "$TYPE_URL" -o "$TYPE_OUTPUT_FILE"


UPLOAD_METADATA="http://localhost:8080/api/admin/datasetfield/load"

echo "Uploaded metadata to $UPLOAD_METADATA"

UPDATE_SOLR="http://localhost:8080/api/admin/index/solr/schema"
curl "$UPDATE_SOLR"

curl -H "X-Dataverse-key:$API_TOKEN" -H "Content-Type: application/json" "http://localhost:8080/api/datasets/datasetTypes" -X POST --upload-file review.json
curl -X PUT -H "X-Dataverse-key:$API_TOKEN" "http://localhost:8080/api/dataverses/root/attribute/allowedDatasetTypes?value=review,dataset"

Pre-requisites for testing this.

As mentioned in IQSS/dataverse#11753:

Do all the setup at https://dataverse-guide--11753.org.readthedocs.build/en/11753/admin/dataverses-datasets.html#review-datasets-setup
  1. Login within the SPA and navigate to the Create Dataset page.
  2. By default only one dataset type exists('dataset' type) so you won't see a Dataset Type selector.
  3. Add a new dataset type with:
curl -H "X-Dataverse-key:$API_TOKEN" -H "Content-Type: application/json" "http://localhost:8080/api/datasets/datasetTypes" -X POST -d '{"name":"review","linkedMetadataBlocks":["geospatial"]}'
  1. Navigate again to the Create Dataset Page and now you will see a Dataset Type selector.
  2. Select "Review" and create the dataset.
  3. Go to edit the recently created dataset and you will se a Dataset Type readonly field with the value of "Review".

Does this PR introduce a user interface change? If mockups are available, please link/include them here:

Yes.

The "Create Dataset" page now has a Dataset Type dropdown. See the latest screenshots here: #876 (comment)

Is there a release notes or changelog update needed for this change?:

Not for now, might be good to add it after work related to dataset types is done.

Additional documentation:

@coveralls
Copy link
Copy Markdown

Coverage Status

coverage: 98.063% (+0.5%) from 97.564% — 797-dataset-type-selection-step-v2 into develop

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dataset Type facet doesn't work, no matches Allow for the creation of various dataset types

2 participants