Skip to content

10520 dataset type licenses #11385

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

Open
wants to merge 23 commits into
base: develop
Choose a base branch
from
Open

Conversation

sekmiller
Copy link
Contributor

What this PR does / why we need it: Adds the ability to set licenses available to dataset types as a subset of the licenses available at the installation level. Part of GREI implementation

Which issue(s) this PR closes:

Special notes for your reviewer:
Not much UI action, though I added a filter on the edit dataset terms for when there may be limited licenses available.

Suggestions on how to test this:
Add a dataset type via superuser api. Licenses can be added at create or by update api. Datasets added via api with a dataset type must have a license that is available for that dataset type. If not the license will be set to null. In the edit terms UI the only available licenses should be those available to the dataset type. If the type does not define available licenses then all active licenses should be available.

Does this PR introduce a user interface change? If mockups are available, please link/include them here:
On edit dataset terms the licenses will be limited to those defined for the given dataset type of the dataset being edited.

Is there a release notes update needed for this change?:
included
Additional documentation:
Docs updated to reflect the changes.

@sekmiller sekmiller self-assigned this Apr 1, 2025
@github-actions github-actions bot added FY25 Sprint 19 FY25 Sprint 19 (2025-03-12 - 2025-03-26) FY25 Sprint 20 FY25 Sprint 20 (2025-03-26 - 2025-04-09) GREI 6 Connect Digital Objects GREI Year 3 Year 3 GREI task Size: 10 A percentage of a sprint. 7 hours. Type: Feature a feature request labels Apr 1, 2025
@sekmiller sekmiller moved this to In Progress 💻 in IQSS Dataverse Project Apr 1, 2025
@coveralls
Copy link

coveralls commented Apr 1, 2025

Coverage Status

coverage: 23.09% (-0.02%) from 23.111%
when pulling 8cf2237 on 10520-datasetTypeLicenses
into 8599993 on develop.

This comment has been minimized.

@sekmiller sekmiller removed their assignment Apr 1, 2025
@sekmiller sekmiller moved this from In Progress 💻 to Ready for Review ⏩ in IQSS Dataverse Project Apr 1, 2025

This comment has been minimized.

This comment has been minimized.

@sekmiller sekmiller self-assigned this Apr 2, 2025
@sekmiller sekmiller moved this from Ready for Review ⏩ to In Progress 💻 in IQSS Dataverse Project Apr 2, 2025
@sekmiller sekmiller removed their assignment Apr 3, 2025
@sekmiller sekmiller moved this from In Progress 💻 to Ready for Review ⏩ in IQSS Dataverse Project Apr 3, 2025
@pdurbin pdurbin moved this from Ready for Review ⏩ to In Review 🔎 in IQSS Dataverse Project Apr 8, 2025
@pdurbin pdurbin self-assigned this Apr 8, 2025
Copy link
Member

@pdurbin pdurbin left a comment

Choose a reason for hiding this comment

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

Overall this looks good. I left some feedback.

Comment on lines +61 to +64
<c:if test="#{datasetPage}">
<f:selectItems value="#{DatasetPage.availableLicenses}"
var="license" itemLabel="#{DatasetUtil:getLocalizedLicenseDetails(license, 'NAME')}" itemValue="#{license}"/>
</c:if>
Copy link
Member

Choose a reason for hiding this comment

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

How do I trigger this new availableLicenses logic in the JSF UI? We don't have any way to pass the dataset type in to JSF, do we?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, you would have to create the dataset via the api with json that includes a datasetType

createDatasetResponse.prettyPrint();


createDatasetResponse.then().assertThat().statusCode(CREATED.getStatusCode());
Copy link
Member

Choose a reason for hiding this comment

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

I'm confused. Shouldn't this be a failure instead of CREATED? The only available license is CC0 1.0 but in the JSON "CC BY 4.0" is passed in. Shouldn't it complain that you have to pass CC0 1.0?

This comment has been minimized.

This comment has been minimized.

2 similar comments

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

@cmbz cmbz added the FY25 Sprint 21 FY25 Sprint 21 (2025-04-09 - 2025-04-23) label Apr 9, 2025

This comment has been minimized.

2 similar comments

This comment has been minimized.

Copy link

📦 Pushed preview images as

ghcr.io/gdcc/dataverse:10520-datasetTypeLicenses
ghcr.io/gdcc/configbaker:10520-datasetTypeLicenses

🚢 See on GHCR. Use by referencing with full name as printed above, mind the registry name.

Copy link
Member

@pdurbin pdurbin left a comment

Choose a reason for hiding this comment

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

I think this is ready for QA so I'm approving this.

@sekmiller please keep an eye on the crazy RemoteOverlayAccessIOTest.testRemoteOverlayFiles:103 expected: <true> but was: <false> error I showed you: https://github.com/IQSS/dataverse/actions/runs/14496860036/job/40666682581?pr=11385 . I'm not sure why I'm seeing it. Update: @qqmyers wrote about this in Slack. Someone needs to switch from that test from https://data.qdr.syr.edu/resources to another server.

Recent API test runs on Jenkins have been passing. That's good.

@github-project-automation github-project-automation bot moved this from In Review 🔎 to Ready for QA ⏩ in IQSS Dataverse Project Apr 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FY25 Sprint 19 FY25 Sprint 19 (2025-03-12 - 2025-03-26) FY25 Sprint 20 FY25 Sprint 20 (2025-03-26 - 2025-04-09) FY25 Sprint 21 FY25 Sprint 21 (2025-04-09 - 2025-04-23) GREI Year 3 Year 3 GREI task GREI 6 Connect Digital Objects Size: 10 A percentage of a sprint. 7 hours. Type: Feature a feature request
Projects
Status: Ready for QA ⏩
Development

Successfully merging this pull request may close these issues.

Implement list of allowed datasetType licenses (at global level)
5 participants