Skip to content

Conversation

@ChengShi-1
Copy link
Contributor

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

What this PR does / why we need it:

  • Use Cases of GET and DELETE a template
  • Restructure existing template related uses cases to /template folder

Which issue(s) this PR closes:

Related Dataverse PRs:

Special notes for your reviewer:

  • Mainly check on Use Cases of Get a template and Delete a template, (get dataset templates and create template was implemented before)
  • I ignored some Copilot review now, Copilot has some comments about the naming confusion between Template and Dataset Template. I tried to keep it calling Template instead of Dataset Template, besides getDatasetTemplates use case

Suggestions on how to test this:

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

YES

Additional documentation:

@ChengShi-1 ChengShi-1 linked an issue Jan 7, 2026 that may be closed by this pull request
@github-actions github-actions bot added FY26 Sprint 12 FY26 Sprint 12 (2025-12-03 - 2025-12-17) FY26 Sprint 13 FY26 Sprint 13 (2025-12-17 - 2025-12-31) FY26 Sprint 14 FY26 Sprint 14 (2025-12-31 - 2026-01-14) GREI Re-arch GREI re-architecture-related SPA.Q4.2025.1 Create/Edit Dataset Template Page labels Jan 7, 2026
@ChengShi-1 ChengShi-1 marked this pull request as ready for review January 8, 2026 00:18
Copilot AI review requested due to automatic review settings January 8, 2026 00:18
@ChengShi-1 ChengShi-1 moved this to Ready for Review ⏩ in IQSS Dataverse Project Jan 8, 2026
@ChengShi-1 ChengShi-1 added Size: 10 A percentage of a sprint. 7 hours. Original size: 10 labels Jan 8, 2026
@ChengShi-1 ChengShi-1 changed the title Use Cases of Add and Delete a template Use Cases of Get and Delete a template Jan 8, 2026
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

This PR restructures template-related functionality into a dedicated /templates module and adds new use cases for getting and deleting templates. The changes move template operations from the datasets and collections modules to a more appropriate domain-specific location.

Key Changes:

  • Created new Templates module with dedicated use cases: CreateTemplate, GetTemplate, GetDatasetTemplates, and DeleteTemplate
  • Migrated template functionality from datasets and collections modules to the new templates module
  • Added comprehensive unit, integration, and functional tests for the new template operations

Reviewed changes

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

Show a summary per file
File Description
src/templates/domain/useCases/GetTemplate.ts New use case for retrieving a single template by ID
src/templates/domain/useCases/DeleteTemplate.ts New use case for deleting a template by ID
src/templates/domain/useCases/CreateTemplate.ts Migrated and updated CreateTemplate use case from collections module
src/templates/domain/useCases/GetDatasetTemplates.ts Migrated use case for getting templates by collection
src/templates/domain/repositories/ITemplatesRepository.ts New repository interface defining template operations
src/templates/domain/models/Template.ts Updated template model definitions (renamed from DatasetTemplate)
src/templates/infra/repositories/TemplatesRepository.ts New repository implementation for template operations
src/templates/infra/repositories/transformers/templateTransformers.ts Transformer logic migrated from datasets module
src/templates/infra/repositories/transformers/TemplatePayload.ts Updated payload interface for templates
src/templates/index.ts Module exports for templates domain
src/index.ts Added templates module to main exports
test/unit/templates/*.test.ts New unit tests for template use cases
test/integration/templates/TemplateRepository.test.ts Comprehensive integration tests for template repository
test/functional/templates/createDatasetTemplate.test.ts Updated functional test with new import paths
src/datasets/domain/useCases/GetDatasetTemplates.ts Removed - migrated to templates module
src/datasets/infra/repositories/transformers/datasetTemplateTransformers.ts Removed - migrated to templates module
src/collections/domain/useCases/CreateDatasetTemplate.ts Removed - migrated to templates module
src/collections/infra/repositories/CollectionsRepository.ts Removed createDatasetTemplate method
docs/useCases.md Updated documentation with new Templates section and reorganized template use cases
CHANGELOG.md Updated with new template use cases

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

Comment on lines +12 to +19

- New Use Case: [Get Collections For Linking Use Case](./docs/useCases.md#get-collections-for-linking).
- New Use Case: [Create a Dataset Template](./docs/useCases.md#create-a-dataset-template) under Collections.

- New Use Case: [Create a Template](./docs/useCases.md#create-a-template) under Templates.

- New Use Case: [Get a Template](./docs/useCases.md#get-a-template) under Templates.

- New Use Case: [Delete a Template](./docs/useCases.md#delete-a-template) under Templates.
Copy link

Copilot AI Jan 8, 2026

Choose a reason for hiding this comment

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

Documentation formatting: There's inconsistent spacing in the CHANGELOG. Line 12 has an empty line before the entry, line 14 has an empty line before the entry, but there's no empty line before lines 15, 17, and 19. Consider adding consistent empty lines between all new use case entries for better readability.

Copilot uses AI. Check for mistakes.
@IQSS IQSS deleted a comment from Copilot AI Jan 8, 2026
@IQSS IQSS deleted a comment from Copilot AI Jan 8, 2026
@ekraffmiller ekraffmiller self-assigned this Jan 9, 2026
@ekraffmiller ekraffmiller moved this from Ready for Review ⏩ to In Review 🔎 in IQSS Dataverse Project Jan 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

FY26 Sprint 12 FY26 Sprint 12 (2025-12-03 - 2025-12-17) FY26 Sprint 13 FY26 Sprint 13 (2025-12-17 - 2025-12-31) FY26 Sprint 14 FY26 Sprint 14 (2025-12-31 - 2026-01-14) GREI Re-arch GREI re-architecture-related Original size: 10 Size: 10 A percentage of a sprint. 7 hours. SPA.Q4.2025.1 Create/Edit Dataset Template Page

Projects

Status: In Review 🔎

Development

Successfully merging this pull request may close these issues.

Use Cases of GET and DELETE a template

3 participants