From d807936776530b218ccf5f86069a96c8bd7c5d1a Mon Sep 17 00:00:00 2001 From: prerna-egov Date: Thu, 2 Jan 2025 15:05:04 +0530 Subject: [PATCH] assigning 0 to campaign start date if it's not present --- .../tarento/analytics/org/service/TarentoServiceImpl.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/core-services/dashboard-analytics/src/main/java/com/tarento/analytics/org/service/TarentoServiceImpl.java b/core-services/dashboard-analytics/src/main/java/com/tarento/analytics/org/service/TarentoServiceImpl.java index ec359379799..97dfa1f2c3c 100644 --- a/core-services/dashboard-analytics/src/main/java/com/tarento/analytics/org/service/TarentoServiceImpl.java +++ b/core-services/dashboard-analytics/src/main/java/com/tarento/analytics/org/service/TarentoServiceImpl.java @@ -100,7 +100,13 @@ public AggregateDto getAggregatedData(AggregateRequestDto request, List if (isCappedTillToday(chartNode)){ - long campaignStartDateInMillis = Long.parseLong(String.valueOf(request.getFilters().get("campaignStartDate"))); + long campaignStartDateInMillis = 0L; // Default value + if (request.getFilters().containsKey("campaignStartDate")) { + Object campaignStartDate = request.getFilters().get("campaignStartDate"); + if (campaignStartDate != null) { + campaignStartDateInMillis = Long.parseLong(String.valueOf(campaignStartDate)); + } + } long currentDateTimeInMillis = Calendar.getInstance().getTimeInMillis(); request.getRequestDate().setStartDate(String.valueOf(campaignStartDateInMillis)); request.getRequestDate().setEndDate(String.valueOf(currentDateTimeInMillis));