ChildMindInstitute / mindlogger-app

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

The percentage and average calculation for slider item is broken on mobile app and admin #2821

Closed natalia-muzyka closed 1 year ago

natalia-muzyka commented 2 years ago

Two slider items are selected to calculate. Two slider item has a 0-5 range.

Percentage:

image.png

Average:

image.png

Not reproduced on radio and checkbox item.

Environment: ML v0.21.48 staging iPhone 7 // iOS 13.1.1 Google Pixel 5a // Android 11 https://admin-staging.mindlogger.org/ Win 10 / Chrome 103 user-stg@ml.com / 123456 Config report v14 / Test A, Test B Applet password Qwe123!!!

binarybottle commented 2 years ago

Why is the "all" value 0.00 for Test A?

WorldImpex commented 2 years ago

@binarybottle That is the bug that Natalia identified. It should be either the percentage or average being shown of two slider inputs but instead it shows 0.00

natalia-muzyka commented 2 years ago

@binarybottle @WorldImpex Percentage and average score of all types fails because of the slider. I checked radio and checkbox separately, they work fine together.

natalia-muzyka commented 1 year ago

Not reproduced on prod in this applet: My applet 6 / Double items, Double items (percentage) test-user1@com.us / qwerty Applet password Qwe123!!!

natalia-muzyka commented 1 year ago

There was an issue because of the incorrect option score value in the slider items on staging activity. That's why I wasn't able to reproduce it on prod (my comment above). I fixed option score values and now the average and percentage work for the slider. Trying to find how I was able to save such invalid scores for slider.

image.png

There is another issue with the slider that I was thinking is related to this original ticket. Even if the slider range is started not from 0 there will be a 0 score value for the first response option anyway. Created a new ticket for this: https://app.zenhub.com/workspaces/mindlogger-5e11094d0c26311588da9626/issues/childmindinstitute/mindlogger-app/2851

cc: @WorldImpex