DMP-4199: Only expire event when all linked cases have expired#2293
Merged
Ben-Edwards-cgi merged 15 commits intomasterfrom Nov 26, 2024
Merged
DMP-4199: Only expire event when all linked cases have expired#2293Ben-Edwards-cgi merged 15 commits intomasterfrom
Ben-Edwards-cgi merged 15 commits intomasterfrom
Conversation
jackmaloney
reviewed
Nov 21, 2024
...ationTest/java/uk/gov/hmcts/darts/task/runner/impl/CaseExpiryDeletionAutomatedTaskITest.java
Outdated
Show resolved
Hide resolved
jackmaloney
reviewed
Nov 21, 2024
src/main/java/uk/gov/hmcts/darts/common/repository/EventLinkedCaseRepository.java
Outdated
Show resolved
Hide resolved
jackmaloney
reviewed
Nov 21, 2024
src/main/java/uk/gov/hmcts/darts/common/service/impl/DataAnonymisationServiceImpl.java
Show resolved
Hide resolved
jackmaloney
reviewed
Nov 21, 2024
src/test/java/uk/gov/hmcts/darts/common/service/impl/DataAnonymisationServiceImplTest.java
Outdated
Show resolved
Hide resolved
jackmaloney
approved these changes
Nov 25, 2024
karen-hedges
approved these changes
Nov 26, 2024
This file contains hidden or 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
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.
Links
Change description
When the case expiry job runs, the event text of all associated events are anonymised. However, events can be linked to multiple cases. Therefore, the event text should only be removed once the is_data_anonymised flag for all linked cases has been set to true.
h4. Acceptance criteria
AC1: Event linked to multiple cases, with all is_data_anonymised flags set to true for linked cases
GIVEN
a single event is linked to multiple cases
AND
the is_data_anonymised flag is set to true for all linked cases
WHEN
the case expiry job runs
THEN
the event text is anonymised
AC2: Event linked to multiple cases, with at least one is_data_anonymised flag is set to false
GIVEN
a single event is linked to multiple cases
AND
the is_data_anonymised flag is set to false for at least one linked cases that has a retain_until_ts in the future
WHEN
the case expiry job runs
THEN
the event text is not anonymised
Does this PR introduce a breaking change? (check one with "x")