ChildMindInstitute / mindlogger-app

MindLogger (React Native) data collection app
Other
15 stars 6 forks source link

Checkbox: Last two choices are checked together #2551

Open WorldImpex opened 2 years ago

WorldImpex commented 2 years ago

Steps to recreate

  1. Log into prod (wavanauken+5@gmail.com/ abcd123) on mobile
  2. Take Welcome applet
  3. On survey screen select the second to last or last choice on checkbox item
  4. See results

Expected: User can make a choice of either Actual: Both options are selected by choosing one

ezgif-3-3a23c307dd.gif

natalia-muzyka commented 2 years ago

@WorldImpex I can't reproduce the issue on my devices: https://www.screencast.com/t/rU40He4Za Could you retest your, please?

Environment: ML v0.18.63 PROD iPhone XR // iOS 14.3 iPhone 12 Pro // iOS 14.4 iPad Air 2 Wi-Fi // iOS 14.6 Samsung Galaxy S7 // Android 8 Samsung Galaxy Tab S6 SM-T865 // Android 9.0

WorldImpex commented 2 years ago

Issue was resolved

natalia-muzyka commented 2 years ago

@WorldImpex @binarybottle @eleonova-scn

I'm able to reproduce the issue. The main cause for this bug is on the applet builder side. After deleting the previous response option (other than the last) in the radio or checkbox item, and adding a new one below, the response option's order number is the same for the last two options. Even after renaming this has an impact on the mobile app (the double selection issue, which is described in the ticket) and unexpected data export.

Steps:

  1. Create a new radio item.
  2. Specify the prompt (text creator) and add three default response options.
  3. Delete Option 1
  4. Add a new response option below and pay attention to its default name.
  5. Rename the added option.
  6. Repeat steps 1-5 with the checkbox item
  7. Save the activity.
  8. Pass the activity on the mobile app: select the last option on the radio and checkbox screen and complete.
  9. Compare actual user's responses with the DataViz (Responses, Review tab), CSV report.
  10. Repeat steps 1-9 with the checkbox item.

Actual result: After deleting the previous option and adding a new one, the last option has the same default name as the option above it. After renaming the newly added option and completing the activity there are the next issues: 1 - a double selection on the mobile app side (the last two options are selected instead of the last one) 2 - in the CSV report there is the same order number for the two last options

Expected result: After deleting the previous option and adding a new one, the last option has a different default name than the option above it. After saving as default or renaming the newly added option and completing the activity the exported data match the user's responses.

Video: https://www.screencast.com/t/WHfR924M1E4d

Notes: If there is a config report specified, then in the PDF report there are two last options displayed as selected instead of the last one. image.png

Environment: https://admin-staging.mindlogger.org/ Win 10 / Chrome 105.0.5195.102 user-stg@ml.com / 123456 applet / activity: New applet (1) / New activity 4 Applet and PDF password: Qwe123!!!