Skip to content

Commit

Permalink
Gard2-2341 Part-7
Browse files Browse the repository at this point in the history
set the flags as Y when program is changed.
  • Loading branch information
githubmamatha committed Dec 7, 2023
1 parent 9c2d862 commit 23fb43f
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ public Pair<GraduationStudentRecord, GradStatusEvent> updateGraduationStatus(UUI
validation.stopOnErrors();
return Pair.of(new GraduationStudentRecord(), null);
}
if(hasDataChanged.hasDataChanged()) {
if(hasDataChanged.hasDataChanged() && !sourceObject.getProgram().equalsIgnoreCase(gradEntity.getProgram())) {
deleteStudentOptionalPrograms(sourceObject.getStudentID());
deleteStudentCareerPrograms(sourceObject.getStudentID());
if(gradEntity.getProgram().equalsIgnoreCase("SCCP")) {
Expand All @@ -222,6 +222,11 @@ public Pair<GraduationStudentRecord, GradStatusEvent> updateGraduationStatus(UUI
}
}

if (hasDataChanged.hasDataChanged()) {
gradEntity.setRecalculateGradStatus(hasDataChanged.getRecalculateGradStatus());
gradEntity.setRecalculateProjectedGrad(hasDataChanged.getRecalculateProgectedGrad());
}

BeanUtils.copyProperties(sourceObject, gradEntity, CREATE_USER, CREATE_DATE, "studentGradData", "studentProjectedGradData", "recalculateGradStatus", "recalculateProjectedGrad");
gradEntity.setProgramCompletionDate(sourceObject.getProgramCompletionDate());
gradEntity.setUpdateUser(null);
Expand Down

0 comments on commit 23fb43f

Please sign in to comment.