Skip to content

Commit b74ceb5

Browse files
author
Levente Gal
committed
#13159 Automatically (Soft-)Delete Samples & Pathogen Tests with Negative Test Results for COVID-19 - rename config property
1 parent 536f9c8 commit b74ceb5

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

sormas-api/src/main/java/de/symeda/sormas/api/ConfigFacade.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,5 +162,5 @@ public interface ConfigFacade {
162162

163163
boolean isAnyCaseClassificationCalculationEnabled();
164164

165-
Integer getNegaiveCovidSamplesMaxAgeDays();
165+
Integer getNegaiveCovidTestsMaxAgeDays();
166166
}

sormas-backend/src/main/java/de/symeda/sormas/backend/common/ConfigFacadeEjb.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ public class ConfigFacadeEjb implements ConfigFacade {
187187
public static final int DEFAULT_DOCUMENT_UPLOAD_SIZE_LIMIT_MB = 20;
188188
public static final String IMPORT_FILE_SIZE_LIMIT_MB = "importFileSizeLimitMb";
189189
public static final int DEFAULT_IMPOR_FILE_SIZE_LIMIT_MB = 20;
190-
public static final String NEGAIVE_COVID_SAMPLES_MAX_AGE_DAYS = "negaiveCovidSamplesMaxAgeDays";
190+
public static final String NEGATIVE_COVID_TESTS_MAX_AGE_DAYS = "negativeCovidTestsMaxAgeDays";
191191

192192
private final Logger logger = LoggerFactory.getLogger(getClass());
193193

@@ -840,8 +840,8 @@ public void resetRequestContext() {
840840
}
841841

842842
@Override
843-
public Integer getNegaiveCovidSamplesMaxAgeDays() {
844-
return parseProperty(NEGAIVE_COVID_SAMPLES_MAX_AGE_DAYS, null, Integer::parseInt);
843+
public Integer getNegaiveCovidTestsMaxAgeDays() {
844+
return parseProperty(NEGATIVE_COVID_TESTS_MAX_AGE_DAYS, null, Integer::parseInt);
845845
}
846846

847847
@LocalBean

sormas-backend/src/main/java/de/symeda/sormas/backend/sample/SampleService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1286,7 +1286,7 @@ public List<DiseaseVariant> getAssociatedDiseaseVariants(String sampleUuid) {
12861286
}
12871287

12881288
public void cleanupOldCovidSamples() {
1289-
final Integer maxAgeDays = configFacade.getNegaiveCovidSamplesMaxAgeDays();
1289+
final Integer maxAgeDays = configFacade.getNegaiveCovidTestsMaxAgeDays();
12901290
if (maxAgeDays == null) {
12911291
return;
12921292
}

sormas-backend/src/test/java/de/symeda/sormas/backend/sample/DeleteOldPathogenTestsAndSamplesTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public void init() {
5454
user = creator.createUser(rdcf).toReference();
5555
caze = creator.createCase(user, creator.createPerson().toReference(), rdcf);
5656

57-
MockProducer.getProperties().setProperty(ConfigFacadeEjb.NEGAIVE_COVID_SAMPLES_MAX_AGE_DAYS, String.valueOf(negativeCovidTestMaxAge));
57+
MockProducer.getProperties().setProperty(ConfigFacadeEjb.NEGATIVE_COVID_TESTS_MAX_AGE_DAYS, String.valueOf(negativeCovidTestMaxAge));
5858
}
5959

6060
@Test
@@ -242,7 +242,7 @@ public void testDeletionReferenceDate() {
242242

243243
@Test
244244
public void testNotConfigured() {
245-
MockProducer.getProperties().remove(ConfigFacadeEjb.NEGAIVE_COVID_SAMPLES_MAX_AGE_DAYS);
245+
MockProducer.getProperties().remove(ConfigFacadeEjb.NEGATIVE_COVID_TESTS_MAX_AGE_DAYS);
246246

247247
SampleDto sample = creator.createSample(caze.toReference(), user, rdcf.facility, s -> {
248248
s.setPathogenTestResult(PathogenTestResultType.NEGATIVE);

sormas-base/setup/sormas.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ app.url=
143143
# Number of days after which negative CORONAVIRUS pathogen tests and their samples are soft deleted
144144
# default: not set, meaning no delete
145145
# possible values: any integer representing the number of days
146-
# negativeCovidSamplesMaxAgeDays
146+
# negativeCovidTestsMaxAgeDays
147147

148148
# The similarity threshold after which two names are identified as similar enough to consider them for duplicate detection.
149149
# The default value should work for most servers. If you need to change it, please change it carefully as slightly higher or lower values already lead to significant differences.

0 commit comments

Comments
 (0)