Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#11465 - Limit case duplicate merging comparison based on creation da… #11734

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code linting fails because of these changes

Copy link
Contributor Author

@sergiupacurariu sergiupacurariu Mar 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error is received due to a misconfiguration of CICD pipeline.

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