From be27dc17a82409bb07cd8b664a7da7dac0b15a44 Mon Sep 17 00:00:00 2001 From: Jinil Sung Date: Tue, 5 Dec 2023 09:47:26 -0800 Subject: [PATCH] GRAD2-2023: fixed the sorting order in minElectiveCredits1996Rule. GRAD2-2023: fixed the sorting order in minElectiveCredits1996Rule. --- .../educ/api/ruleengine/rule/MinElectiveCredits1996Rule.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/api/src/main/java/ca/bc/gov/educ/api/ruleengine/rule/MinElectiveCredits1996Rule.java b/api/src/main/java/ca/bc/gov/educ/api/ruleengine/rule/MinElectiveCredits1996Rule.java index fb11609..64aeeea 100644 --- a/api/src/main/java/ca/bc/gov/educ/api/ruleengine/rule/MinElectiveCredits1996Rule.java +++ b/api/src/main/java/ca/bc/gov/educ/api/ruleengine/rule/MinElectiveCredits1996Rule.java @@ -39,8 +39,7 @@ public RuleData fire() { .getUniqueStudentCourses(ruleProcessorData.getStudentCourses(), ruleProcessorData.isProjected()); List minCreditGrade12Courses = tempStudentCourseList.stream().filter(StudentCourse::isUsedInMinCreditRule).collect(Collectors.toList()); tempStudentCourseList.removeAll(minCreditGrade12Courses); - tempStudentCourseList.sort(Comparator.comparing(StudentCourse::getCourseLevel).reversed() - .thenComparing(StudentCourse::getCompletedCoursePercentage).reversed()); + tempStudentCourseList.sort(Comparator.comparing(StudentCourse::getCompletedCoursePercentage).reversed()); List studentCourses = new ArrayList<>(minCreditGrade12Courses); studentCourses.addAll(tempStudentCourseList);