Skip to content

Conversation

ChengShi-1
Copy link
Contributor

@ChengShi-1 ChengShi-1 commented Sep 24, 2025

What this PR does / why we need it:

Inspired from Edit terms page, related to 2025 Q3 features.

⚠️ Waiting for IQSS/dataverse#11815, please don't merge it till the backend finish.
Update from Germán: re-run tests once related backend PR is merged.

Which issue(s) this PR closes:

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

yes it should have

@ChengShi-1 ChengShi-1 linked an issue Sep 24, 2025 that may be closed by this pull request
@github-actions github-actions bot added FY26 Sprint 6 FY26 Sprint 6 (2025-09-10 - 2025-09-24) GREI Re-arch GREI re-architecture-related SPA.Q3.2025.3 Dataset Page: Edit Terms labels Sep 24, 2025
@ChengShi-1 ChengShi-1 self-assigned this Sep 24, 2025
@ChengShi-1 ChengShi-1 added Size: 3 A percentage of a sprint. 2.1 hours. Waiting Original size: 3 labels Sep 24, 2025
@ChengShi-1 ChengShi-1 moved this to In Progress 💻 in IQSS Dataverse Project Sep 24, 2025
@ChengShi-1 ChengShi-1 marked this pull request as ready for review September 24, 2025 21:47
@ChengShi-1 ChengShi-1 moved this from In Progress 💻 to Ready for Review ⏩ in IQSS Dataverse Project Sep 24, 2025
@ChengShi-1 ChengShi-1 removed their assignment Sep 24, 2025
@g-saracca g-saracca moved this from Ready for Review ⏩ to In Review 🔎 in IQSS Dataverse Project Sep 25, 2025
@g-saracca g-saracca self-assigned this Sep 25, 2025
@g-saracca g-saracca requested a review from Copilot September 25, 2025 13:19
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements the "Set Dataset License and Custom Terms Use Case" which adds functionality to update dataset licenses or custom terms through the Dataverse API. It provides support for both predefined licenses (by name) and custom terms of use and access.

  • Adds UpdateDatasetLicense use case and repository method for the PUT /datasets/{id}/license endpoint
  • Introduces DatasetLicenseUpdateRequest DTO to handle both predefined and custom license updates
  • Includes comprehensive test coverage across unit, integration, and functional test levels

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/datasets/domain/dtos/DatasetLicenseUpdateRequest.ts New DTO defining the structure for license update requests
src/datasets/domain/useCases/UpdateDatasetLicense.ts New use case implementing the license update functionality
src/datasets/domain/repositories/IDatasetsRepository.ts Interface extension adding updateDatasetLicense method
src/datasets/infra/repositories/DatasetsRepository.ts Repository implementation for the license update endpoint
src/datasets/index.ts Module exports for the new functionality
test/unit/datasets/UpdateDatasetLicense.test.ts Unit tests for the use case
test/integration/datasets/DatasetsRepository.test.ts Integration tests for repository methods
test/functional/datasets/UpdateDatasetLicense.test.ts Functional tests for end-to-end scenarios
docs/useCases.md Documentation for the new use case
CHANGELOG.md Release notes entry

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@g-saracca
Copy link
Contributor

@ChengShi-1 What about setting the TermsOfAccess?

@ChengShi-1
Copy link
Contributor Author

@ChengShi-1 What about setting the TermsOfAccess?

IQSS/dataverse#11772 is still in progress, I'll create new issue once it's ready

Copy link
Contributor

@g-saracca g-saracca left a comment

Choose a reason for hiding this comment

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

Cool, approving!

@github-project-automation github-project-automation bot moved this from In Review 🔎 to Ready for QA ⏩ in IQSS Dataverse Project Sep 25, 2025
@g-saracca g-saracca removed their assignment Sep 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FY26 Sprint 6 FY26 Sprint 6 (2025-09-10 - 2025-09-24) GREI Re-arch GREI re-architecture-related Original size: 3 Size: 3 A percentage of a sprint. 2.1 hours. SPA.Q3.2025.3 Dataset Page: Edit Terms Waiting
Projects
Status: Ready for QA ⏩
Development

Successfully merging this pull request may close these issues.

Set Dataset License and Custom Terms Use Case
2 participants