-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add rules and adjust existing rule #231
Conversation
Josh and I discovered that there is an extra case that delayed recall questions can be, and have some current instances of:
With this in mind, we still needed to check if all of the values that were NOT 88 or 93 - 95 did not have a sum of > 5 |
The completed form cannot have these values as null, but just to make sure i am making the code null safe.
int? mocarecnValue = 0; | ||
int? mocareccValue = 0; | ||
int? mocarecrValue = 0; | ||
|
||
//if input is an exception value (93 - 95 or 88) then calculate as 0 in total | ||
if (MOCARECN != null) | ||
{ | ||
mocarecnValue = MOCARECN >= 95 ? 0 : MOCARECN; | ||
} | ||
|
||
if (MOCARECC != null) | ||
{ | ||
mocareccValue = MOCARECC == 88 ? 0 : MOCARECC; | ||
} | ||
|
||
if (MOCARECR != null) | ||
{ | ||
mocarecrValue = MOCARECR == 88 ? 0 : MOCARECR; | ||
} | ||
|
||
if (mocarecnValue + mocareccValue + mocarecrValue > 5) return null; | ||
|
||
return true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made this code null safe, even though it should not be possible to reach a finalized state AND have null values for MOCARECN, MOCARECC, and MOCARECR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mlan225 Looks good! 👍 I added a small commit so the display of the error messages follows the existing behavior in the form (displaying in the 3rd column).
Existing layout of error messages in the 3rd column:
Failure states
MOCARECN + MOCARECC + MOCARECR > 5
If MOCARECN == 5 then ( MOCARECC != 88 && MOCARECR != 88)
Success states
If MOCARECN == 5 then ( MOCARECC == 88 && MOCARECR == 88)
@mlan225 Good to bump the version to 4.6.5 and merge to main. After merge to main tag commit with v4.6.5 to trigger github action to build nuget packages. |
@mlan225 We have some more cards getting approved. This needs to be merged first or the version numbers will get out of sync. |
FIxes: #221
These questions are the focus of the PR. The numbering can change depending on the form types, but the labels and validation will remain the same.
example of error text display
Adjust the validation for the C2 in all versions of the form (InPerson and remote):