Reverted to original version

This commit is contained in:
Matti Uusitalo 2018-11-20 14:04:31 +02:00 committed by Eeva Turkka
parent b7843498dc
commit a981452957
1 changed files with 0 additions and 13 deletions

View File

@ -55,17 +55,6 @@ public class QuestionnaireResponseValidator extends BaseValidator {
*/
private IWorkerContext myWorkerCtx;
// this is here not to introduce enabledWhen validation unless wanted
private boolean skipEnabledCheck = true;
public boolean isSkipEnabledCheck() {
return skipEnabledCheck;
}
public void setSkipEnabledCheck(boolean skipEnabledCheck) {
this.skipEnabledCheck = skipEnabledCheck;
}
public QuestionnaireResponseValidator(IWorkerContext theWorkerCtx) {
this.myWorkerCtx = theWorkerCtx;
@ -227,14 +216,12 @@ public class QuestionnaireResponseValidator extends BaseValidator {
List<QuestionnaireResponseItemComponent> responseItems = findResponsesByLinkId(theResponseItems, linkId);
if (responseItems.isEmpty()) {
if (nextQuestionnaireItem.getRequired()) {
if ((skipEnabledCheck /*|| myEnableWhenEvaluator.isQuestionEnabled(nextQuestionnaireItem, theResponseItems)*/) && nextQuestionnaireItem.getRequired() ) {
if (theValidateRequired) {
rule(theErrors, IssueType.BUSINESSRULE, thePathStack, false, "Missing required {0} with linkId[{1}]", itemType, linkId);
} else {
hint(theErrors, IssueType.BUSINESSRULE, thePathStack, false, "Missing required {0} with linkId[{1}]", itemType, linkId);
}
}
}
continue;
}
if (responseItems.size() > 1) {