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

GRAD2-3000: removed the slp date validation for SCCP & enhanced the error reporting #343

Merged
merged 1 commit into from
Oct 17, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,6 @@ public ConvGradStudent convertStudent(ConvGradStudent convGradStudent, Conversio
return convGradStudent;
}

// Program Completion for graduated student
if (!validateProgramCompletionDate(convGradStudent, summary)) {
return convGradStudent;
}

// Student conversion process
process(convGradStudent, students, summary, reload, ongoingUpdate);

Expand Down Expand Up @@ -619,20 +614,6 @@ private void handleAdultStartRule(Student penStudent, GraduationStudentRecord gr
}
}

/**
*
* @return true Valid
* false Bad data (programCompletionDate is null)
*/
private boolean validateProgramCompletionDate(ConvGradStudent convGradStudent, ConversionStudentSummaryDTO summary) {
if ("SCCP".equalsIgnoreCase(convGradStudent.getGraduationRequirementYear()) &&
StringUtils.isBlank(convGradStudent.getSlpDate())) {
handleException(convGradStudent, summary, convGradStudent.getPen(), ConversionResultType.FAILURE, "Bad data: slp_date is null for SCCP");
return false;
}
return true;
}

/**
*
* @return true Valid
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ public <T extends Object> void processEvent(T request, Event event) {
return;
}
if (result == null || ConversionResultType.FAILURE.equals(result.getResult())) {
if (!summary.getErrors().isEmpty()) {
summary.getErrors().forEach(e -> log.error("Load is failed for {} - {}", e.getItem(), e.getReason()));
}
return;
}
}
Expand Down
Loading