-
Notifications
You must be signed in to change notification settings - Fork 2
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
Feature/refaktorere dokumenter fra bestilling og maler #3698
Merged
krharum
merged 16 commits into
master
from
feature/refaktorere-dokumenter-fra-bestilling-og-maler
Jan 9, 2025
Merged
Feature/refaktorere dokumenter fra bestilling og maler #3698
krharum
merged 16 commits into
master
from
feature/refaktorere-dokumenter-fra-bestilling-og-maler
Jan 9, 2025
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add a new SQL migration script to create the 'dokument' table. This table includes columns for 'id', 'sist_oppdatert', 'versjon', and 'contents'. It ensures the table exists by using the IF NOT EXISTS clause.
Implemented database migration for managing documents tied to orders and templates. Added entity, repository, service, and controller layers to support retrieving and persisting documents. Introduced new endpoints for fetching documents by order ID.
Renamed variables for clarity and added logic to update `bestilling` objects with serialized `utvidetBestilling`. This ensures the data remains consistent after processing and improves maintainability.
Documents are now saved to the database and referenced by unique IDs, removing the need to handle raw document data directly in requests. This improves security and aligns better with best practices. Also, refactored related service and mapping logic to accommodate this change.
The `brevkode` and `tittel` fields were removed from the `DokumentInfo` class as they are no longer needed. This helps simplify the code and reduces potential maintenance overhead.
Renamed the service directory from 'person-altinn3-tilgang-service' to 'testnav-altinn3-tilgang-service' in the build context. This ensures the correct service path is used during the build process.
Extended DokumentService to retrieve documents by template ID and document ID list. Updated the corresponding controllers and repositories to support these operations. Refactored existing methods for clarity and streamlined the Histark and Dokarkiv clients by removing redundant code.
Add environment data directly during template creation in `MalBestillingService`. Ensure physical document contents are cleared after reference creation in `MigrateDokumentService`. Fix typos in API documentation for `DokumentController`.
Eliminated an unused import from MigrateDokumentService to clean up the code. Added a new functional interface `TriConsumer` in the service package to support operations with three input parameters.
Annotated `MigrationConfig` with `@Profile("!test")` to ensure it is only loaded in non-test environments. This prevents unnecessary initialization during testing and aligns with environment-specific configuration standards.
Adds a mock implementation for `bestillingRepository.save` in `BestillingServiceTest`. This ensures proper testing and prevents dependency-related issues during unit test execution.
stigus
approved these changes
Jan 9, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Supert 😄
Deploy #deploy-test-dolly-backend Extracted JSON conversion logic into dedicated methods `fromJson` and `toJson` to improve readability and reduce duplication. Improved error handling to ensure non-null values for `bestKriterier`, enhancing robustness.
#deploy-test-dolly-backend Separate logic for storing documents and templates into dedicated methods for improved readability and maintainability. Added logging and error handling to ensure better traceability and resilience during the migration process.
krharum
deleted the
feature/refaktorere-dokumenter-fra-bestilling-og-maler
branch
January 9, 2025 14:15
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.