From cc472faca08efac3de372810add34b1b683c90cf Mon Sep 17 00:00:00 2001 From: arybakov Date: Tue, 23 Jan 2024 15:24:20 -0700 Subject: [PATCH 1/2] GRAD2-2477 (GRAD) - P3 Incident: 1950 program includes Non-Completion Reason "506 - N/A" --- .../bc/gov/educ/api/graduation/service/GraduationService.java | 2 +- .../ca/bc/gov/educ/api/graduation/service/ReportService.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api/src/main/java/ca/bc/gov/educ/api/graduation/service/GraduationService.java b/api/src/main/java/ca/bc/gov/educ/api/graduation/service/GraduationService.java index eee950dd..6abf991f 100644 --- a/api/src/main/java/ca/bc/gov/educ/api/graduation/service/GraduationService.java +++ b/api/src/main/java/ca/bc/gov/educ/api/graduation/service/GraduationService.java @@ -400,7 +400,7 @@ private List processStudentList(List gradStudL } private List getNonGradReasons(String gradProgramCode, List nonGradReasons) { - nonGradReasons.removeIf(a -> "506".equalsIgnoreCase(a.getTranscriptRule()) && (StringUtils.isNotBlank(gradProgramCode) && gradProgramCode.contains("1950"))); + nonGradReasons.removeIf(a -> ("506".equalsIgnoreCase(a.getTranscriptRule()) || "506".equalsIgnoreCase(a.getRule())) && (StringUtils.isNotBlank(gradProgramCode) && gradProgramCode.contains("1950"))); List nList = new ArrayList<>(); if (nonGradReasons != null) { for (GradRequirement gR : nonGradReasons) { diff --git a/api/src/main/java/ca/bc/gov/educ/api/graduation/service/ReportService.java b/api/src/main/java/ca/bc/gov/educ/api/graduation/service/ReportService.java index 4fa141e1..e38fae23 100644 --- a/api/src/main/java/ca/bc/gov/educ/api/graduation/service/ReportService.java +++ b/api/src/main/java/ca/bc/gov/educ/api/graduation/service/ReportService.java @@ -278,7 +278,7 @@ private List getNonGradReasons(String gradProgramCode, List applyFilters && "505".equalsIgnoreCase(a.getTranscriptRule()) && (StringUtils.isNotBlank(gradProgramCode) && gradProgramCode.contains("1950"))); - nonGradReasons.removeIf(a -> "506".equalsIgnoreCase(a.getTranscriptRule()) && (StringUtils.isNotBlank(gradProgramCode) && gradProgramCode.contains("1950"))); + nonGradReasons.removeIf(a -> ("506".equalsIgnoreCase(a.getTranscriptRule()) || "506".equalsIgnoreCase(a.getRule())) && (StringUtils.isNotBlank(gradProgramCode) && gradProgramCode.contains("1950"))); for (ca.bc.gov.educ.api.graduation.model.dto.GradRequirement gR : nonGradReasons) { String code = xml ? traxReqCodes.get(gR.getRule()) : gR.getTranscriptRule(); NonGradReason obj = new NonGradReason(); From a95cbf9bd08e647d257d67f988d44ffa747740d6 Mon Sep 17 00:00:00 2001 From: arybakov Date: Tue, 23 Jan 2024 15:37:01 -0700 Subject: [PATCH 2/2] GRAD2-2477 (GRAD) - P3 Incident: 1950 program includes Non-Completion Reason "506 - N/A" --- .../gov/educ/api/graduation/service/GraduationService.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/api/src/main/java/ca/bc/gov/educ/api/graduation/service/GraduationService.java b/api/src/main/java/ca/bc/gov/educ/api/graduation/service/GraduationService.java index 6abf991f..9130c090 100644 --- a/api/src/main/java/ca/bc/gov/educ/api/graduation/service/GraduationService.java +++ b/api/src/main/java/ca/bc/gov/educ/api/graduation/service/GraduationService.java @@ -469,16 +469,12 @@ private byte[] getSchoolReportNonGradRegReport(ReportData data, String mincode, } + @Generated private void createAndSaveSchoolReportNonGradRegReport(ReportData data, String mincode, String accessToken) { - byte[] bytesSAR = getSchoolReportNonGradRegReport(data, mincode, accessToken); - String encodedPdf = getEncodedPdfFromBytes(bytesSAR); - SchoolReports requestObj = getSchoolReports(mincode, encodedPdf, NONGRADREG); - updateSchoolReport(accessToken, requestObj); - } private byte[] getSchoolReportStudentNonGradPrjReport(ReportData data, String mincode, String accessToken) {