You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a user selects an answer that reveals more-than-one conditional questions where at least one is mandatory, followed by changing principal answer to hide conditional questions, the user is blocked from navigating to the next section.
Only one of the conditional questions must be marked as mandatory to prevent section navigation.
##Severity Medium to Major
While this bug doesn't completely break survey module, it does break the ability to use multiple conditional questions -- where at least one is mandatory -- in response to a single principal question. This can be a serious problem for strategic information gathering.
To Reproduce
Odoo v16.0:
Create a new survey.
Configure presentation option to "One page per section".
On the questions tab, add two sections and title them Section 1 and Section 2 respectively.
Under the second section add a simple textfield question. This is necessary so that navigating from the first section doesn't go immediately to the end of the survey.
Under the first section, add three multiple choice questions. Name the first question "Principal" and the second and third questions "Conditional 1" and "Conditional 2".
The survey question table should look like this:
On Principal, add two answer choices with these values: "Show additional questions" and "Skip"
On Conditional 1 and Conditional 2, add a couple multiple choice answers for each of them. The answers can be anything you want.
Save the form. (Saving here is necessary so that the conditional options can be configured in the next step).
Configure both conditional questions to be Conditional to the Principal. Set the Triggering Answer to be "Show additional questions"
Make Conditional 1 mandatory. The other two questions should not be mandatory.
Save the form.
Test the Survey
Click Start Survey button.
You should see the Principal Question.
Select "Show additional questions"
You should see the conditional questions.
Change the principal answer to "Skip"
Click Continue button
Nothing should happen! Navigation is blocked!
Change the principal answer to "Show additional questions"
You should see that the first question has the red notice indicating an answer is required.
Follow up changes and Second Test
Close the Test and go back to the Survey admin UI.
Open the options for Conditional 2. Uncheck "Conditional".
Save survey and test it again.
Repeat the same test procedure from above but you should see that navigation works fine.
##Analysis
If there is more-than-one conditional question, the validation logic requires mandatory conditional questions to be answered.
##Additional Concerns
I haven't looked at the javascript code, because I'm completely new to Odoo framework and my time is quite constrained right now. However, I want to voice that the nature of this bug would lead a seasoned developer to question the efficacy of the underlying code. Its a very weird bug that, at least to my mind, suggests the entire validation logic might be a bit shakey -- I find it hard to imagine writing such a weird bug into my own javascript. This is a wildly speculative observation, but I think its worth mentioning. It would be bad if there are other strange bugs lurking with technical debt.
The text was updated successfully, but these errors were encountered:
Module
Surveys (Odoo v16.0)
Describe the bug
When a user selects an answer that reveals more-than-one conditional questions where at least one is mandatory, followed by changing principal answer to hide conditional questions, the user is blocked from navigating to the next section.
Only one of the conditional questions must be marked as mandatory to prevent section navigation.
##Severity
Medium to Major
While this bug doesn't completely break survey module, it does break the ability to use multiple conditional questions -- where at least one is mandatory -- in response to a single principal question. This can be a serious problem for strategic information gathering.
To Reproduce
Odoo v16.0:
Test the Survey
Follow up changes and Second Test
##Analysis
If there is more-than-one conditional question, the validation logic requires mandatory conditional questions to be answered.
##Additional Concerns
I haven't looked at the javascript code, because I'm completely new to Odoo framework and my time is quite constrained right now. However, I want to voice that the nature of this bug would lead a seasoned developer to question the efficacy of the underlying code. Its a very weird bug that, at least to my mind, suggests the entire validation logic might be a bit shakey -- I find it hard to imagine writing such a weird bug into my own javascript. This is a wildly speculative observation, but I think its worth mentioning. It would be bad if there are other strange bugs lurking with technical debt.
The text was updated successfully, but these errors were encountered: