Skip to content

PSP-11043 financial codes validation#5142

Merged
devinleighsmith merged 3 commits intobcgov:devfrom
asanchezr:psp-11043-financial-codes-validation
Jan 15, 2026
Merged

PSP-11043 financial codes validation#5142
devinleighsmith merged 3 commits intobcgov:devfrom
asanchezr:psp-11043-financial-codes-validation

Conversation

@asanchezr
Copy link
Collaborator

Screenshot 2026-01-07 235353

@asanchezr asanchezr self-assigned this Jan 9, 2026
@asanchezr asanchezr added enhancement New feature or request 5.15 labels Jan 9, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Jan 9, 2026

See CodeCov Report Here: https://app.codecov.io/github/bcgov/psp/pull/5142

1 similar comment
@github-actions
Copy link
Contributor

github-actions bot commented Jan 9, 2026

See CodeCov Report Here: https://app.codecov.io/github/bcgov/psp/pull/5142


private static void ValidateMandatoryFinancialCodes(PimsAcquisitionFile currentAcquisitionFile, PimsCompensationRequisition newCompensation)
{
if (newCompensation.IsDraft.HasValue && !newCompensation.IsDraft.Value)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think valid shorthand for this is newCompensation.IsDraft == false

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll tried the == false but vscode intellisense told me to change it to what I did. I will try again

}
if (!isValidString(file?.project?.workActivityCode?.code)) {
errors.workActivity =
'Work activity is required Ensure a valid project is associated to this file (or alternate project) with required financial coding.';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: missing period after required.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

copy/pasta - will fix

@devinleighsmith
Copy link
Collaborator

@asanchezr looks good except for when adding a alternate project - in my test cases I added an alternate project with a product and all required codes, but I was unable to save the comp req due to validation errors.

@asanchezr
Copy link
Collaborator Author

@asanchezr looks good except for when adding a alternate project - in my test cases I added an alternate project with a product and all required codes, but I was unable to save the comp req due to validation errors.

ah you're right. did not account for alternate project. will look into it

@asanchezr asanchezr force-pushed the psp-11043-financial-codes-validation branch from edf1ae4 to f3124cb Compare January 13, 2026 23:40
@github-actions
Copy link
Contributor

See CodeCov Report Here: https://app.codecov.io/github/bcgov/psp/pull/5142

@sonarqubecloud
Copy link

@github-actions
Copy link
Contributor

See CodeCov Report Here: https://app.codecov.io/github/bcgov/psp/pull/5142

@devinleighsmith devinleighsmith added this pull request to the merge queue Jan 15, 2026
Merged via the queue into bcgov:dev with commit ecaa1f6 Jan 15, 2026
18 checks passed
@asanchezr asanchezr deleted the psp-11043-financial-codes-validation branch January 22, 2026 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

5.15 enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants