PSP-11043 financial codes validation#5142
Conversation
asanchezr
commented
Jan 9, 2026
|
See CodeCov Report Here: https://app.codecov.io/github/bcgov/psp/pull/5142 |
1 similar comment
|
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) |
There was a problem hiding this comment.
I think valid shorthand for this is newCompensation.IsDraft == false
There was a problem hiding this comment.
I'll tried the == false but vscode intellisense told me to change it to what I did. I will try again
...ntend/src/features/mapSideBar/compensation/update/UpdateCompensationRequisitionContainer.tsx
Show resolved
Hide resolved
| } | ||
| 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.'; |
There was a problem hiding this comment.
nit: missing period after required.
There was a problem hiding this comment.
copy/pasta - will fix
|
@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 |
edf1ae4 to
f3124cb
Compare
|
See CodeCov Report Here: https://app.codecov.io/github/bcgov/psp/pull/5142 |
|
|
See CodeCov Report Here: https://app.codecov.io/github/bcgov/psp/pull/5142 |


