Skip to content

Conversation

@Joao-vi
Copy link
Collaborator

@Joao-vi Joao-vi commented Dec 15, 2025

fixes #8694

PR checklist:

  • Update READ.me ?
  • Update API documentation ?

QA checklist:

  • Smoke test the functionality described in the issue
  • Test for side effects
  • UI responsiveness
  • Cross browser testing
  • Code review

Copilot AI review requested due to automatic review settings December 15, 2025 19:22
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 implements the Update Thesaurus use case, which allows updating thesaurus entities including their names and values. The implementation includes domain logic for computing differences between thesaurus versions, updating translations accordingly, and managing background jobs for entity denormalization.

Key changes:

  • Added Thesaurus.update() method and ThesaurusDiff class for computing changes between thesaurus versions
  • Implemented UpdateThesaurusUseCase with transaction support and job management
  • Extended queue system with deleteByParams() functionality to manage background jobs
  • Added comprehensive test coverage for domain logic, services, and integration scenarios

Reviewed changes

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

Show a summary per file
File Description
app/setUpJestServer.js Added polyfill for structuredClone for Node versions < 17
app/api/i18n.v2/database/MongoTranslationsDataSource.ts Added updateKeysByContextV2 method for bulk translation key updates
app/api/i18n.v2/contracts/TranslationsDataSource.ts Added UpdateKeysByContextProps type and interface method
app/api/core/libs/queue/infrastructure/*.ts Implemented deleteByParams across queue adapters and dispatchers
app/api/core/infrastructure/mongodb/thesauri/MongoThesaurusDataSourceV2.ts Added update and geyById methods (note: typo in method name)
app/api/core/infrastructure/jobs/DenormalizeThesaurusEntitiesHandler.ts Created job handler for denormalizing thesaurus entities
app/api/core/domain/thesaurus/Thesaurus.ts Implemented update method and getValueById helper
app/api/core/domain/thesaurus/ThesaurusDiff.ts Created class to compute differences between thesaurus versions
app/api/core/domain/thesaurus/errors.ts Added InvalidThesaurusValueIdsError validation error
app/api/core/application/thesaurusTranslationService/ThesaurusTranslationService.ts Added update method to handle translation updates
app/api/core/application/UpdateThesaurus.ts Implemented the main use case with transaction support
app/api/core/application/contracts/ThesauriDataSource.ts Extended interface with geyById and update methods (note: typo)
app/api/common.v2/utils/Test.ts Added arrayIncludesObjects test helper
Various test files Comprehensive test coverage for new functionality

💡 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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Thesaurus v2 update

2 participants