Skip to content

Conversation

@ChengShi-1
Copy link
Contributor

@ChengShi-1 ChengShi-1 commented Jan 22, 2026

What this PR does / why we need it:

Based on PR IQSS/dataverse#11989 , set a template to default and remove a template's default setting

Which issue(s) this PR closes:

Related Dataverse PRs:

  • Depends on #11989

Special notes for your reviewer:

Suggestions on how to test this:

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

Additional documentation:

@ChengShi-1 ChengShi-1 linked an issue Jan 22, 2026 that may be closed by this pull request
@github-actions github-actions bot added FY26 Sprint 15 FY26 Sprint 15 (2026-01-14 - 2026-01-28) GREI Re-arch GREI re-architecture-related SPA.Q1.2026.6 labels Jan 22, 2026
@ChengShi-1 ChengShi-1 added Size: 3 A percentage of a sprint. 2.1 hours. Original size: 3 labels Jan 22, 2026
@ChengShi-1 ChengShi-1 changed the title Set/unset default template, and its tests Set/Unset a Template as Default Jan 22, 2026
@ChengShi-1 ChengShi-1 moved this to Ready for Review ⏩ in IQSS Dataverse Project Jan 22, 2026
@ChengShi-1 ChengShi-1 marked this pull request as ready for review January 22, 2026 20:34
Copilot AI review requested due to automatic review settings January 22, 2026 20:34
Copy link
Contributor

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

Adds client support for setting and unsetting a Dataverse collection’s default dataset template.

Changes:

  • Introduces SetTemplateAsDefault / UnsetTemplateAsDefault use cases and exports them via src/templates.
  • Adds setTemplateAsDefault / unsetTemplateAsDefault methods to TemplatesRepository and ITemplatesRepository.
  • Adds unit, integration, and functional tests plus documentation/changelog updates.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
test/unit/templates/UnsetTemplateAsDefault.test.ts Unit coverage for UnsetTemplateAsDefault use case behavior and error propagation.
test/unit/templates/SetTemplateAsDefault.test.ts Unit coverage for SetTemplateAsDefault use case behavior and error propagation.
test/integration/templates/TemplateRepository.test.ts Integration coverage for new repository methods against the API.
test/functional/templates/UnsetTemplateAsDefault.test.ts Functional coverage for end-to-end unsetting default template via public API.
test/functional/templates/SetTemplateAsDefault.test.ts Functional coverage for end-to-end setting default template via public API.
src/templates/infra/repositories/TemplatesRepository.ts Implements POST/DELETE calls to Dataverse default-template endpoints.
src/templates/index.ts Exposes new use cases from the templates module.
src/templates/domain/useCases/UnsetTemplateAsDefault.ts New use case wiring to repository for unsetting default.
src/templates/domain/useCases/SetTemplateAsDefault.ts New use case wiring to repository for setting default.
src/templates/domain/repositories/ITemplatesRepository.ts Extends repository contract with set/unset default methods.
docs/useCases.md Documents new templates write use cases and example calls.
CHANGELOG.md Notes new use cases/repository support for default-template endpoints.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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

Labels

FY26 Sprint 15 FY26 Sprint 15 (2026-01-14 - 2026-01-28) GREI Re-arch GREI re-architecture-related Original size: 3 Size: 3 A percentage of a sprint. 2.1 hours. SPA.Q1.2026.6

Projects

Status: Ready for Review ⏩

Development

Successfully merging this pull request may close these issues.

Use Case to set default template

2 participants