Skip to content

Commit

Permalink
Merge pull request #11734 from hzi-braunschweig/feature-11465_limit_c…
Browse files Browse the repository at this point in the history
…ase_duplicate_merging_on_creation_and_archive

#11465 - Limit case duplicate merging comparison based on creation da…
  • Loading branch information
leventegal-she authored Mar 27, 2023
2 parents e3669df + cd24bf7 commit 1d0e672
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
6 changes: 6 additions & 0 deletions sormas-backend/src/main/resources/sql/sormas_schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -12320,4 +12320,10 @@ ALTER TABLE testreport_history ADD COLUMN dateofresult varchar(255);

INSERT INTO schema_version (version_number, comment) VALUES (511, 'Add dateOfResult to TestReports #11453');

-- 2023-03-27 Limit case duplicate merging comparison based on creation date and archived status #11465
-- the index idx_cases_disease was remove to improve merge duplicate cases query this will force to use idx_cases_creationdate_desc in the query plan which is a lot more efficient
DROP INDEX idx_cases_disease;

INSERT INTO schema_version (version_number, comment) VALUES (512, 'Limit case duplicate merging comparison based on creation date and archived status #11465');

-- *** Insert new sql commands BEFORE this line. Remember to always consider _history tables. ***
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ private void addSecondRowLayout() {

private void addThirdRowLayout() {
thirdRowLayout = new HorizontalLayout();
thirdRowLayout.setSpacing(true);
thirdRowLayout.setMargin(false);
thirdRowLayout.setWidth(100, Unit.PERCENTAGE);

Expand Down Expand Up @@ -283,7 +284,7 @@ private void addThirdRowLayout() {
CssStyles.LABEL_BACKGROUND_FOCUS_LIGHT,
CssStyles.LABEL_BOLD);
thirdRowLayout.addComponent(lblNumberOfDuplicates);
thirdRowLayout.setComponentAlignment(lblNumberOfDuplicates, Alignment.MIDDLE_RIGHT);
thirdRowLayout.setComponentAlignment(lblNumberOfDuplicates, Alignment.BOTTOM_RIGHT);
thirdRowLayout.setExpandRatio(lblNumberOfDuplicates, 1);

relevanceStatusFilter = new ComboBox<>();
Expand All @@ -306,8 +307,8 @@ private void addThirdRowLayout() {
});

criteriaBinder.bind(relevanceStatusFilter, CaseCriteria.ENTITY_RELEVANCE_STATUS);

thirdRowLayout.addComponent(relevanceStatusFilter);
thirdRowLayout.setComponentAlignment(relevanceStatusFilter, Alignment.BOTTOM_RIGHT);

addComponent(thirdRowLayout);
}
Expand Down

0 comments on commit 1d0e672

Please sign in to comment.