-
Notifications
You must be signed in to change notification settings - Fork 247
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
Skip hidden field from validation #1610
Conversation
...in/java/com/google/android/fhir/datacapture/validation/QuestionnaireResponseItemValidator.kt
Outdated
Show resolved
Hide resolved
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.
Thanks @maimoonak. LGTM. 👍
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.
LGTM 👍
@maimoonak please use the assignee field to assign PRs to reviewers for a faster turn around |
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.
thanks @maimoonak !
...in/java/com/google/android/fhir/datacapture/validation/QuestionnaireResponseItemValidator.kt
Outdated
Show resolved
Hide resolved
...c/main/java/com/google/android/fhir/datacapture/validation/QuestionnaireResponseValidator.kt
Show resolved
Hide resolved
...st/java/com/google/android/fhir/datacapture/validation/QuestionnaireResponseValidatorTest.kt
Outdated
Show resolved
Hide resolved
...in/java/com/google/android/fhir/datacapture/validation/QuestionnaireResponseItemValidator.kt
Outdated
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## master #1610 +/- ##
============================================
- Coverage 36.36% 36.26% -0.11%
Complexity 330 330
============================================
Files 149 149
Lines 4947 4961 +14
Branches 879 880 +1
============================================
Hits 1799 1799
- Misses 2910 2922 +12
- Partials 238 240 +2
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
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.
Thanks
Fixes #1579
Description
Hidden field does not qualify for any validation. Response validation marks hidden field as valid and passes validation irrespective of it value
Alternative(s) considered
The validation skips the hidden field in when doing questionnaire-reponse validation. The other option could have doing it inside each and every validator but that makes it repetitive, non central, and does not keep room to revert it easily for specific validator types in future.
Type
Choose one: Bug fix
Checklist
./gradlew spotlessApply
and./gradlew spotlessCheck
to check my code follows the style guide of this project../gradlew check
and./gradlew connectedCheck
to test my changes locally.