Skip to content

DMP-4199: Only expire event when all linked cases have expired#2293

Merged
Ben-Edwards-cgi merged 15 commits intomasterfrom
DMP-4199
Nov 26, 2024
Merged

DMP-4199: Only expire event when all linked cases have expired#2293
Ben-Edwards-cgi merged 15 commits intomasterfrom
DMP-4199

Conversation

@Ben-Edwards-cgi
Copy link
Copy Markdown
Contributor

Links

Jira

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")

[ ] Yes
[X] No

@Ben-Edwards-cgi Ben-Edwards-cgi requested review from a team as code owners November 20, 2024 16:58
@Ben-Edwards-cgi Ben-Edwards-cgi requested review from ciaranca, davet1985, hemantasharma1129, jackmaloney, ozzyib and ryanmcalary11 and removed request for a team November 20, 2024 16:58
@Ben-Edwards-cgi Ben-Edwards-cgi enabled auto-merge (squash) November 26, 2024 11:07
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.

4 participants