Skip to content

Commit

Permalink
[GITFLOW]merging 'hotfix-1.66.4' into 'master'
Browse files Browse the repository at this point in the history
  • Loading branch information
MateStrysewske committed Dec 21, 2021
2 parents d902cfa + f2f48e3 commit 1cecb08
Show file tree
Hide file tree
Showing 18 changed files with 30 additions and 42 deletions.
2 changes: 1 addition & 1 deletion sormas-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<parent>
<groupId>de.symeda.sormas</groupId>
<artifactId>sormas-base</artifactId>
<version>1.66.3</version>
<version>1.66.4</version>
<relativePath>../sormas-base</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public class LabMessageCriteria extends BaseCriteria implements Serializable {
private Date messageDateTo;
private Date birthDateFrom;
private Date birthDateTo;
private Boolean deleted = Boolean.FALSE;

public String getUuid() {
return uuid;
Expand Down Expand Up @@ -89,4 +90,12 @@ public Date getBirthDateTo() {
public void setBirthDateTo(Date birthDateTo) {
this.birthDateTo = birthDateTo;
}

public Boolean getDeleted() {
return deleted;
}

public void setDeleted(Boolean deleted) {
this.deleted = deleted;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ public interface LabMessageFacade {
// Also returns deleted lab messages
List<LabMessageDto> getByReportId(String reportId);

// Also considers deleted lab messages
boolean existsForwardedLabMessageWith(String reportId);

}
2 changes: 1 addition & 1 deletion sormas-app/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>sormas-base</artifactId>
<groupId>de.symeda.sormas</groupId>
<version>1.66.3</version>
<version>1.66.4</version>
<relativePath>../sormas-base</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion sormas-backend/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>sormas-base</artifactId>
<groupId>de.symeda.sormas</groupId>
<version>1.66.3</version>
<version>1.66.4</version>
<relativePath>../sormas-base</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,6 @@ public List<LabMessageIndexDto> getIndexList(LabMessageCriteria criteria, Intege
whereFilter = labMessageService.buildCriteriaFilter(cb, labMessage, criteria);
}

// remove deleted entities from result
whereFilter = CriteriaBuilderHelper.and(cb, whereFilter, labMessageService.createDefaultFilter(cb, labMessage));
cq.where(whereFilter);

// Distinct is necessary here to avoid duplicate results due to the user role join in taskService.createAssigneeFilter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,6 @@ public LabMessageService() {
super(LabMessage.class);
}

/**
* Creates a default filter that should be used as the basis of queries in this service..
* This essentially removes {@link CoreAdo#deleted} lab messages from the queries.
*/
public Predicate createDefaultFilter(CriteriaBuilder cb, Root<LabMessage> root) {
return cb.isFalse(root.get(LabMessage.DELETED));
}

@Override
public Predicate createUserFilter(CriteriaBuilder cb, CriteriaQuery cq, From<?, LabMessage> from) {
return null;
Expand Down Expand Up @@ -119,6 +111,11 @@ public Predicate buildCriteriaFilter(CriteriaBuilder cb, Root<LabMessage> labMes
cb.lessThanOrEqualTo(labMessage.get(LabMessage.PERSON_BIRTH_DATE_DD), dayTo)))));
filter = CriteriaBuilderHelper.and(cb, filter, birthDateToFilter);
}

if (criteria.getDeleted() != null) {
filter = CriteriaBuilderHelper.and(cb, filter, cb.equal(labMessage.get(LabMessage.DELETED), criteria.getDeleted()));
}

return filter;
}

Expand All @@ -130,8 +127,7 @@ public List<LabMessage> getForSample(SampleReferenceDto sample) {
LabMessageCriteria criteria = new LabMessageCriteria();
criteria.setSample(sample);

Predicate filter = createDefaultFilter(cb, labMessageRoot);
filter = CriteriaBuilderHelper.and(cb, filter, buildCriteriaFilter(cb, labMessageRoot, criteria));
Predicate filter = buildCriteriaFilter(cb, labMessageRoot, criteria);

cq.where(filter);
cq.distinct(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,6 @@ public class LabMessageServiceUnitTest {
@Mock
private Predicate predicate;

@Test
public void testCreateDefaultFilter() {

LabMessageService sut = new LabMessageService();
when(cb.isFalse(any())).thenReturn(predicate);

Predicate result = sut.createDefaultFilter(cb, labMessage);

assertEquals(predicate, result);
}

@Test
public void testBuildCriteriaFilter() {

Expand Down
7 changes: 0 additions & 7 deletions sormas-base/dependencies/check-suppressions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,6 @@
<filePath regex="true">.*\bgradle-wrapper.*\.jar</filePath>
<cve>CVE-2019-15052</cve>
</suppress>
<suppress>
<notes><![CDATA[
Not relevant at the moment because we do not use SocketServer to receive logs.
]]></notes>
<filePath regex="true">.*\blogback-.*\.jar</filePath>
<cve>CVE-2017-5929</cve>
</suppress>
<suppress>
<notes><![CDATA[
maven-ant-tasks is not part of the release and is not relied on by the code
Expand Down
2 changes: 1 addition & 1 deletion sormas-base/dependencies/serverlibs.pom
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<parent>
<artifactId>sormas-base</artifactId>
<groupId>de.symeda.sormas</groupId>
<version>1.66.3</version>
<version>1.66.4</version>
<relativePath>../</relativePath>
</parent>

Expand Down
4 changes: 2 additions & 2 deletions sormas-base/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<groupId>de.symeda.sormas</groupId>
<artifactId>sormas-base</artifactId>
<packaging>pom</packaging>
<version>1.66.3</version>
<version>1.66.4</version>

<properties>
<maven.compiler.source>1.8</maven.compiler.source>
Expand All @@ -27,7 +27,7 @@
<!-- *** Other dependency versions *** -->
<glassfish.jaxb.version>2.3.3</glassfish.jaxb.version>
<slf4j.version>1.7.30</slf4j.version>
<logback.version>1.1.7</logback.version>
<logback.version>1.2.9</logback.version>
<vaadin.version.warning>TODO: Remove bootstrap.js in widgetset</vaadin.version.warning>
<vaadin.version>8.14.1</vaadin.version>
<vaadin.plugin.version>${vaadin.version}</vaadin.plugin.version>
Expand Down
3 changes: 2 additions & 1 deletion sormas-base/setup/logback.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xml>
<configuration scan="true" scanPeriod="30 seconds" debug="true">
<!-- scan disabled as precaution for CVE-2021-42550 and similar -->
<configuration scan="false" scanPeriod="30 seconds" debug="true">

<!-- TODO Configure EMAIL_ERROR appender for your server or STDOUT for your local development system -->

Expand Down
1 change: 1 addition & 0 deletions sormas-base/setup/server-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,7 @@ read -p "--- Press [Enter] to continue..."
# Logging
echo "Configuring logging..."
${ASADMIN} create-jvm-options "-Dlogback.configurationFile=\${com.sun.aas.instanceRoot}/config/logback.xml"
${ASADMIN} create-jvm-options "-DlogbackDisableServletContainerInitializer=true"
${ASADMIN} set-log-attributes com.sun.enterprise.server.logging.GFFileHandler.maxHistoryFiles=14
${ASADMIN} set-log-attributes com.sun.enterprise.server.logging.GFFileHandler.rotationLimitInBytes=0
${ASADMIN} set-log-attributes com.sun.enterprise.server.logging.GFFileHandler.rotationOnDateChange=true
Expand Down
2 changes: 1 addition & 1 deletion sormas-cargoserver/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>de.symeda.sormas</groupId>
<artifactId>sormas-base</artifactId>
<version>1.66.3</version>
<version>1.66.4</version>
<relativePath>../sormas-base</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion sormas-ear/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>de.symeda.sormas</groupId>
<artifactId>sormas-base</artifactId>
<version>1.66.3</version>
<version>1.66.4</version>
<relativePath>../sormas-base</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion sormas-rest/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>de.symeda.sormas</groupId>
<artifactId>sormas-base</artifactId>
<version>1.66.3</version>
<version>1.66.4</version>
<relativePath>../sormas-base</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion sormas-ui/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>sormas-base</artifactId>
<groupId>de.symeda.sormas</groupId>
<version>1.66.3</version>
<version>1.66.4</version>
<relativePath>../sormas-base</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion sormas-widgetset/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>sormas-base</artifactId>
<groupId>de.symeda.sormas</groupId>
<version>1.66.3</version>
<version>1.66.4</version>
<relativePath>../sormas-base</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down

0 comments on commit 1cecb08

Please sign in to comment.