akvo / akvo-flow

A data collection and monitoring tool that works anywhere.
http://akvo.org/products/akvoflow/
GNU Affero General Public License v3.0
65 stars 31 forks source link

Enable question dependency within repeat question groups #1439

Closed muloem closed 8 years ago

muloem commented 9 years ago

It should not be possible to have a question dependent on another question that is within a repeat question group, if the two questions are not in the same group. However, if they are within the same question group it should be possible.

GeertSoet commented 9 years ago

Assigned to Tender discussion #6011.

muloem commented 9 years ago

Test Plan

Pre-test prep

Create a survey with at least 3 question groups. ensure the one in the middle is set as a repeatable question group and in the first two groups include option questions first and then a mix of other types of questions. In the third group include different kinds of questions. Publish the survey and assign to a device.

Test 1: Dependency across repeat question group

  1. Edit questions in the second group, i.e. the repeat question group.
  2. Select a question and try to set it as dependent on the option question in the first group.
  3. The option questions from the first group should appear in the dependencies list, as well as option questions within the repeat question group that appear before the question that you are trying to set as dependent on another.
  4. Set one of the questions within the repeat question group to be dependent on a question in the first group and save.
  5. Edit a question in the third group and set it to be dependent. The dependency list should only include option questions from the first non-repeat question group. Save the question.
  6. Re-publish the survey and update on the device and ensure that the questions behave as expected when trying to respond to the survey.

Test 2: Dependency within repeat question group

  1. Edit a question within the repeat question group that appears after the option question within the same group.
  2. Set that question as dependent and verify that the option question within the repeat question group appears as one of the possible dependencies. Select the question within the repeat question group as the dependency and save.
  3. Republish the survey and verify that these dependencies behave correctly when responding multiple times to the repeated questions.
muloem commented 8 years ago

Already included in hotfix release https://github.com/akvo/akvo-flow/releases/tag/v1.9.1.3