Skip to content

Commit

Permalink
#2112 - Application Bulk Withdrawal: Business Validations - Bug Fix (#…
Browse files Browse the repository at this point in the history
…2491)

## As a part of this PR, the following is fixed:

**Bug:** When an application record in the bulk withdrawal file where
the student has previously withdrawn from the program (scholastic
standing) is processed and the same record in the file also has an
incorrect value of SIN:
 
### The below errors and warnings are shown:

<img width="1918" alt="image"
src="https://github.com/bcgov/SIMS/assets/7859295/a485250e-395d-4552-8bc1-18f5b43836f2">

### **[Fix]** Instead the following errors and warnings must be shown:

<img width="1920" alt="image"
src="https://github.com/bcgov/SIMS/assets/7859295/7df329e7-7660-424b-a2fc-c0f92115508d">
  • Loading branch information
sh16011993 authored Nov 9, 2023
1 parent 937b182 commit 6993f6c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,11 @@ export class ApplicationWithdrawalImportTextService {
textValidation.textModel.applicationNumber;
validationModel.withdrawalDate = textValidation.textModel.withdrawalDate;
validationModel.applicationFound = false;
if (applicationData) {
if (
applicationData &&
textValidation.textModel.sin === applicationData.sin
) {
validationModel.applicationFound = true;
validationModel.studentSINMatch =
textValidation.textModel.sin === applicationData.sin;
validationModel.isArchived = applicationData.isArchived;
validationModel.applicationStatus = applicationData.applicationStatus;
validationModel.hasPreviouslyBeenWithdrawn =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,20 +66,6 @@ export class ApplicationBulkWithdrawalValidationModel {
),
})
applicationFound: boolean;
/**
* Valid SIN.
*/
@ValidateIf(
(object: ApplicationBulkWithdrawalValidationModel) =>
object.applicationFound,
)
@IsIn([true], {
message: "The record was not found and will be skipped.",
context: ValidationContext.CreateWarning(
ApplicationWithdrawalValidationWarnings.NoMatchingRecordFound,
),
})
studentSINMatch?: boolean;
/**
* Application Status.
*/
Expand Down

0 comments on commit 6993f6c

Please sign in to comment.