diff --git a/dhis-2/dhis-services/dhis-service-administration/src/main/resources/data-integrity-checks/categories/category_option_groups_excess_members.yaml b/dhis-2/dhis-services/dhis-service-administration/src/main/resources/data-integrity-checks/categories/category_option_groups_excess_members.yaml index eb4c4f79a4f3..7a865aab41e8 100644 --- a/dhis-2/dhis-services/dhis-service-administration/src/main/resources/data-integrity-checks/categories/category_option_groups_excess_members.yaml +++ b/dhis-2/dhis-services/dhis-service-administration/src/main/resources/data-integrity-checks/categories/category_option_groups_excess_members.yaml @@ -54,7 +54,7 @@ summary_sql: >- GROUP BY x.uid,x.name,x.cogs_name ) SELECT COUNT(*), - 100 * COUNT(*) / NULLIF( (SELECT COUNT(*) FROM categoryoption), 0) as percent + 100 * COUNT(*) / NULLIF( (SELECT COUNT(*) FROM dataelementcategoryoption), 0) as percent FROM cos_multiple_groups; details_sql: >- SELECT x.uid,x.name, x.cogs_name || ' :{'|| diff --git a/dhis-2/dhis-services/dhis-service-administration/src/main/resources/data-integrity-checks/categories/category_options_no_categories.yaml b/dhis-2/dhis-services/dhis-service-administration/src/main/resources/data-integrity-checks/categories/category_options_no_categories.yaml index e2f0c65e2acd..26f1ecb871b0 100644 --- a/dhis-2/dhis-services/dhis-service-administration/src/main/resources/data-integrity-checks/categories/category_options_no_categories.yaml +++ b/dhis-2/dhis-services/dhis-service-administration/src/main/resources/data-integrity-checks/categories/category_options_no_categories.yaml @@ -38,7 +38,7 @@ FROM categories_categoryoptions)) SELECT COUNT(*) as value, 100.0 * COUNT(*) / NULLIF( (SELECT COUNT(*) - FROM categoryoption), 0 ) as percent + FROM dataelementcategoryoption), 0 ) as percent FROM category_options_no_categories; details_sql: >- SELECT uid,name FROM dataelementcategoryoption diff --git a/dhis-2/dhis-services/dhis-service-administration/src/test/java/org/hisp/dhis/dataintegrity/DataIntegrityYamlReaderTest.java b/dhis-2/dhis-services/dhis-service-administration/src/test/java/org/hisp/dhis/dataintegrity/DataIntegrityYamlReaderTest.java index 0b4a8898c5b0..86f31d6d5499 100644 --- a/dhis-2/dhis-services/dhis-service-administration/src/test/java/org/hisp/dhis/dataintegrity/DataIntegrityYamlReaderTest.java +++ b/dhis-2/dhis-services/dhis-service-administration/src/test/java/org/hisp/dhis/dataintegrity/DataIntegrityYamlReaderTest.java @@ -103,7 +103,7 @@ void testReadDataIntegrityYaml() { .getIssues() .get(0) .getComment() - .startsWith("SELECT uid,name from category")); + .startsWith("SELECT uid,name from dataelementcategory")); } @Test