ChildMindInstitute / mindlogger-app

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

Conditional Logic is Broken #2857

Closed e-kass closed 1 year ago

e-kass commented 2 years ago

Any conditional logic made prior to the deployment pre-SRC works; however, any edits or new conditional logic does not work. Additionally, some previous conditional logic incorrectly was deleted/cleared, and there is no way to fix it now.

This is a bug across the entire MindLogger platform.

natalia-muzyka commented 2 years ago

@Tom1204 @iradchenk0

1 - Conditional tab: Only radio, checkbox, and slider items are supported to SHOW according to the conditional logic Expected: General conditional logic on the 'Conditional logic' tab should support in the SHOW dropdown: a - IF radio, checkbox, slider items were selected, then radio, checkbox, slider, and text items should be available in the SHOW dropdown b - IF activity name - should be available any item type in the SHOW dropdown !!! This affects existing activities, created manually, and applets that were created with GitHub protocol URL. There are empty fields for the "SHOW" value now if it is not a radio, checkbox or slider.

2 - a slider value is deleted/cleared after saving IS NOT EQUAL TO condition (on 'Conditional logic' tab and 'Reports' tab) Conditional logic tab video: https://www.screencast.com/t/nCJEb2Hg Reports tab video: https://www.screencast.com/t/fE2Pi7dl

3 - IS SHOWN / IS NOT SHOWN condition is deleted after saving (only on the 'Reports' tab) For #3 I created a new ticket in JIRA, as I was not able to reproduce the same for the 'Conditional' tab and there is a question if we need this type of logic in reports: https://mindlogger.atlassian.net/jira/software/projects/MIN/boards/1/backlog?selectedIssue=MIN-9

Environment: https://admin-staging.mindlogger.org/ Win 10 / Chrome 105 v0.18.2 user-stg@ml.com / 123456 applet / activity: Conditional in report retest / Test E Conditional logic / Conditional 3 ml2_general_acc@protonmail.com / Qwertyuiop123!!! applet / activity: DBT Daily Diary Card v1.06 / Events and Goals Applet password: Qwe123!!!

iradchenk0 commented 2 years ago

Seems like everything is on applet-builder side

natalia-muzyka commented 2 years ago

@binarybottle the old version of conditional logic allowed to show only radio/checkbox/slider/text item if a condition is based on the radio/checkbox/slider response selection.

The showing was broken and reduced only to radio/checkbox/slider. Would you agree to allow the showing of any item type, so it doesn't matter if logic is based on selecting item response or showing the activity (for the 1st time or not)?

natalia-muzyka commented 2 years ago

@iradchenk0 after copying an activity with the conditional logic the "if" dropdowns are cleared in the duplicated activity. After saving the applet values are back. Video: https://www.screencast.com/t/Lv0AvrcDQ

Environment: https://admin-staging.mindlogger.org/ Win 10 / Chrome 103 anita_ml@protonmail.com / qwe123!!! New applet test (web) / activity 1, activity 1(1) Applet password: Qwe123!!!

yzenchanka commented 1 year ago

Verified as fixed: Video: https://screencast-o-matic.com/watch/c366jiVtwxl Environment: https://admin-staging.mindlogger.org/ Win 10 / Chrome 103 anita_ml@protonmail.com / qwe123!!! New applet test (web) / activity 1, activity 1(1) Applet password: Qwe123!!!

natalia-muzyka commented 1 year ago

1 - if dropdowns are filled after copying 2 - copying an activity with config reports which includes conditions is available

Environment: https://admin-staging.mindlogger.org/ Win 10 / Chrome 105 anita_ml@protonmail.com / qwe123!!! New applet test (web) , Conditional logic retest Applet password: Qwe123!!!