Skip to content
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

[M2-5044] [M2-4793] 'outside of' rule for slider works incorrectly #635

Merged
merged 2 commits into from
Feb 27, 2024

Conversation

sultanofcardio
Copy link
Contributor

@sultanofcardio sultanofcardio commented Feb 23, 2024

📝 Description

🔗 Jira Ticket M2-5044
🔗 Jira Ticket M2-4793

This PR fixes the logic within AnswerValidator.isOutsideOfValues which was using ConditionalLogicModel.isBetweenValues instead of ConditionalLogicModel.isOutsideOfValues.

I also took the opportunity to update the logic for the Next button because I noticed while testing that the respondent may discover the logic for how to unlock some steps that they may other not have, just by playing with the slider. This brings the mobile app in line with web (see ChildMindInstitute/mindlogger-web-refactor#358).

📸 Screenshots

Before

The logic is incorrect. It advances to the next question on the value 3, when it should only advance when the value is outside the range 2 - 4

before.mov

After

The logic is correct. It advances to the next question on the value 1

after.mov

🪤 Peer Testing

  • Launch the admin web app
  • Create a test applet with the following items
    • A slider with values 0 to 10

      • Enable Show Tick Marks
      • Enable Show Tick Marks Labels

      Your slider preview should look like this:
      image

    • A text item

  • Add an item flow conditional as follows
    • If item slider is outside of the range 2 - 4
    • If any of the “if” rules above are true, show text
    image
  • Build and launch the mobile app
  • Navigate to the slider item
  • Adjust the slider to 1 and click Next
    Expected outcome: The activity should proceed to the text item
  • Click Back
  • Adjust the slider to 3
    Expected outcome: The activity should complete and submit the answers

This is to bring the mobile app in line with the web app ([4788](https://mindlogger.atlassian.net/browse/M2-4788)) and prevent the user from discovering the correct answer to unlock the next step.
@sultanofcardio sultanofcardio self-assigned this Feb 23, 2024
@sultanofcardio sultanofcardio marked this pull request as ready for review February 23, 2024 19:40
Copy link
Contributor

@farmerpaul farmerpaul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested, looks great! 🚀

Copy link
Contributor

@BamMironov BamMironov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Nice job

@sultanofcardio sultanofcardio merged commit f79b195 into dev Feb 27, 2024
4 checks passed
@sultanofcardio sultanofcardio deleted the bugfix/M2-5044-conditional-logic branch February 27, 2024 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants