Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,25 @@ private String submitJob(String jobName, String jobQueue, String jobDefinition,


private String generateStartedEmailContent(String startDate, String endDate) {
return "Your request has been received. Date range: Start Date: " +
startDate + ", End Date: " + endDate + ". Please wait for the result. " +

// only include non-empty date conditions
var startDateCondition = "";
var endDateCondition = "";
var dateRangeCondition = "";
if (startDate != null && !startDate.equals("non-specified")) {
startDateCondition = " Start Date: " + startDate + ".";
}
if (endDate != null && !endDate.equals("non-specified")) {
endDateCondition = " End Date: " + endDate + ".";
}
if (!startDateCondition.isBlank() || !endDateCondition.isBlank()) {
dateRangeCondition = "Date range: " + startDateCondition + endDateCondition;
}

var conditionTitle = dateRangeCondition.isBlank() ? "" : "The conditions of your request include";

return "Your request has been received. " + conditionTitle+ dateRangeCondition +
". Please wait for the result. " +
"After the process is completed, you will receive an email " +
"with the download link.";
}
Expand Down