Skip to content

Allow Creating dataset with default license via API regardless of allow custom terms setting#12551

Open
qqmyers wants to merge 6 commits into
IQSS:developfrom
GlobalDataverseCommunityConsortium:IQSS/11161-defaultLicense
Open

Allow Creating dataset with default license via API regardless of allow custom terms setting#12551
qqmyers wants to merge 6 commits into
IQSS:developfrom
GlobalDataverseCommunityConsortium:IQSS/11161-defaultLicense

Conversation

@qqmyers

@qqmyers qqmyers commented Jul 21, 2026

Copy link
Copy Markdown
Member

What this PR does / why we need it: Dataverse currently creates an incomplete/invalid dataset with no license and no terms of use when a dataset is created by API, the user doesn't specify a license or terms, and the :AllowCustomTerms setting is true.

This PR adds a new JVM setting dataverse.api.assume-default-license-when-not-provided-via-api that allows forcing such a dataset to get the default license regardless of whether custom terms are allowed. One can also force datasets that do not specify a license to not be assigned the default even when terms aren't allowed, or keep the current behavior.

This serves two use cases:

  • being able to assure that a dataset gets the default license even if custom terms are allowed,
  • not assigning a license that the user may not be aware of when the dataset is created via API, forcing the user to select a license/terms before the dataset can be published.

Which issue(s) this PR closes:

Special notes for your reviewer:

Suggestions on how to test this: The basic logic is tested in the new JSON parser test. A Harvard use case for this is to set the new setting to true and assure that the HEAL bridge creates datasets with the default license when Dataverse is configured to allow custom terms. See #368. It would also be good to test that when custom terms aren't allowed, the UIs don't break when a dataset has no license (nominally we show a warning that a license or terms are needed when custom terms are allowed, it's possible that we don't handle this case).

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

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

Additional documentation:

@qqmyers qqmyers moved this to Ready for Triage in IQSS Dataverse Project Jul 21, 2026
@qqmyers qqmyers moved this from Ready for Triage to Ready for Review ⏩ in IQSS Dataverse Project Jul 21, 2026
@qqmyers qqmyers added the Size: 10 A percentage of a sprint. 7 hours. label Jul 21, 2026
@pdurbin pdurbin self-assigned this Jul 22, 2026
@pdurbin pdurbin moved this from Ready for Review ⏩ to In Review 🔎 in IQSS Dataverse Project Jul 22, 2026

@pdurbin pdurbin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I say we make the improved behavior opt-out instead.

Comment on lines +5 to +7
- When set to `true`, the default license will be automatically assigned if no license and no terms are provided in the input JSON.
- When set to `false`, no license (and no terms) will be assigned if none are provided.
- When not set (the default), the system maintains backward compatibility: the default license is assigned if custom terms are not allowed; if custom terms are allowed, no license is assigned.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the default should be the new behavior: give the dataset the default license.

And sure, have a setting for opt-ing out of the new, better behavior, if we feel like it's valuable.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what that would be called if it stays binary true/false. The two states when the new setting is set would then be:

  • don't assume default license if custom terms are allowed
  • never assume the default license

with always assume the default license being the new default. Any suggestions?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could reverse the logic and call it dataverse.api.allow-no-license

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image The new term would have to describe the two states that aren't the new default (top/bottom lines).

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

~nevermind - the problem is only if we need to handle three states, but since any given instance either does/doesn't allow custom terms, there's no one who needs the current capability. I'll reactor...

@qqmyers qqmyers removed their assignment Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Size: 10 A percentage of a sprint. 7 hours.

Projects

Status: In Review 🔎

Development

Successfully merging this pull request may close these issues.

Via API, datasets can be created in an invalid state when it comes to license/terms

2 participants