From 1980449a9b8afc6b7e5c8affb51cb3618ff54457 Mon Sep 17 00:00:00 2001 From: kanishq-egov Date: Mon, 23 Sep 2024 15:23:45 +0530 Subject: [PATCH] HCMPRE-646: added changes --- .../java/org/egov/project/config/ProjectConfiguration.java | 3 +++ .../org/egov/project/validator/project/ProjectValidator.java | 2 +- .../project/src/main/resources/application.properties | 5 ++++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/health-services/project/src/main/java/org/egov/project/config/ProjectConfiguration.java b/health-services/project/src/main/java/org/egov/project/config/ProjectConfiguration.java index 26759e381e2..67ee5a87af6 100644 --- a/health-services/project/src/main/java/org/egov/project/config/ProjectConfiguration.java +++ b/health-services/project/src/main/java/org/egov/project/config/ProjectConfiguration.java @@ -222,4 +222,7 @@ public class ProjectConfiguration { @Value("${project.task.no.resource.validation.status}") private List noResourceStatuses; + + @Value("${project.attendance.feature.enabled:true}") + private Boolean isAttendanceFeatureEnabled; } diff --git a/health-services/project/src/main/java/org/egov/project/validator/project/ProjectValidator.java b/health-services/project/src/main/java/org/egov/project/validator/project/ProjectValidator.java index 266f664312d..9aaba88a427 100644 --- a/health-services/project/src/main/java/org/egov/project/validator/project/ProjectValidator.java +++ b/health-services/project/src/main/java/org/egov/project/validator/project/ProjectValidator.java @@ -75,7 +75,7 @@ public void validateCreateProjectRequest(ProjectRequest request) { //Verify MDMS Data // TODO: Uncomment and fix as per HCM once we get clarity // validateRequestMDMSData(request, tenantId, errorMap); - validateAttendanceSessionAgainstMDMS(request,errorMap,tenantId); + if(config.getIsAttendanceFeatureEnabled()) validateAttendanceSessionAgainstMDMS(request,errorMap,tenantId); //Get boundaries in list from all Projects in request body for validation Map> boundariesForValidation = getBoundaryForValidation(request.getProjects()); diff --git a/health-services/project/src/main/resources/application.properties b/health-services/project/src/main/resources/application.properties index 93f601466a9..71af8eab0d3 100644 --- a/health-services/project/src/main/resources/application.properties +++ b/health-services/project/src/main/resources/application.properties @@ -180,4 +180,7 @@ project.location.capture.kafka.create.topic=save-location-capture-project-topic project.location.capture.consumer.bulk.create.topic=save-location-capture-project-bulk-topic #---------No resource statuses ------------# -project.task.no.resource.validation.status=ADMINISTRATION_FAILED, BENEFICIARY_REFUSED, CLOSED_HOUSEHOLD, NOT_ADMINISTERED \ No newline at end of file +project.task.no.resource.validation.status=ADMINISTRATION_FAILED, BENEFICIARY_REFUSED, CLOSED_HOUSEHOLD, NOT_ADMINISTERED + +#---------Attendance Feature ------------# +project.attendance.feature.enabled=true