Skip to content

Commit

Permalink
Merge pull request #343 from bcgov/feature/GRAD2-3000
Browse files Browse the repository at this point in the history
GRAD2-3000: removed the slp date validation for SCCP & enhanced the error reporting
  • Loading branch information
infstar authored Oct 17, 2024
2 parents 2fba94c + b80f184 commit 6a28495
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 19 deletions.
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

0 comments on commit 6a28495

Please sign in to comment.