Skip to content
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

DMP-4846: When case is expired and CaseExpiryDeletion job runs, the hearing_media_ae record is not deleted #2659

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Ben-Edwards-cgi
Copy link
Contributor

Links

Jira

Change description

Summary of Git Diff

This Git diff introduces enhancements and modifications to the media repository and related services in the codebase, focusing on the handling of media links associated with hearings and court cases. Key changes include the addition of new methods for retrieving media entities by case ID, updates to existing test cases, and the removal of obsolete API interfaces related to hearings.

Highlights

  • New Test Method: Added a test method findByCaseIdWithMediaList_shouldReturnCorrectData in MediaRepositoryIntTest to verify correct media retrieval based on case ID.

  • Repository Updates:

    • Introduced findByCaseIdWithMediaList(Integer caseId) method in MediaRepository for fetching media entities linked to a specific court case.
    • Removed the old method findByCaseIdWithMediaList(Integer caseId) from HearingRepository.
  • Service Layer Changes:

    • Refactored removeMediaLinkToHearing in HearingsServiceImpl to utilize the new media repository method, improving the logic for removing media links from hearings based on case expiration.
  • API Interface Removal: Eliminated the HearingApi and HearingApiImpl classes as their functionality has been migrated to the service layer.

  • Test Suite Adjustments: Updated unit tests in HearingsServiceImplTest and CaseExpiryDeletionAutomatedTaskTest to reflect changes in repository and service method calls, ensuring consistency and correctness in the testing logic.

  • Transactional Changes: Added transactional annotations where necessary to ensure data consistency during media link removals and other operations.

These modifications enhance the codebase's ability to manage media links associated with legal cases, streamline interactions between repositories and services, and ensure robust testing practices are maintained.

Does this PR introduce a breaking change? (check one with "x")

[ ] Yes
[X] No

…results. When running the CaseExpiryDeletion job
@Ben-Edwards-cgi Ben-Edwards-cgi requested review from a team as code owners March 3, 2025 15:19
@Ben-Edwards-cgi Ben-Edwards-cgi requested review from davet1985, jackmaloney, hemantasharma1129, endakelly, Tyler-35 and varun-vijayagopal and removed request for a team March 3, 2025 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant