ChildMindInstitute / mindlogger-app

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

App crashes after idle time is left in the flow activity #2807

Closed natalia-muzyka closed 1 year ago

natalia-muzyka commented 2 years ago

Preconditions The user is logged on admin panel There is the applet with activity flow The mobile app is installed and launched There is the scheduled flow with the idle time option enabled

Steps to reproduce

  1. Login to the app
  2. Proceed to the scheduled flow
  3. Start the flow
  4. Wait for idle time (don't do anything, just wait on the screen)
  5. Observe the result

Actual result App crashes after idle time is left in the flow activity

Expected result The idle time is applied to every activity within the flow. Activity is automatically completed after idle time is left in the flow activity if a user was just waiting on the screen.

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

@WorldImpex please, advise, on how it should work. I assume after the idle time is finished:

Environment: ML v0.21.42 staging iPhone 7 // iOS 13.1.1 Google Pixel 5a // Android 11 user-stg@ml.com / 123456 config reports v11 / one-time completion flow Applet password Qwe123!!!

WorldImpex commented 2 years ago

Interim screen should be shown

natalia-muzyka commented 2 years ago

1 - The single activity started crashing after idle time Video: https://www.screencast.com/t/H6x8LXCIPsH Expected: Thanks screen is shown, selected responses are saved and submitted

2 - Flow activity is not automatically moved to the interim screen after idle time Video: https://www.screencast.com/t/2VHBHqsGsw5 Expected: Interim screen is shown if the activity is not last in the flow. The "Thanks" screen is shown, and selected responses are saved and submitted.

Environment: iPhone 7 // iOS 13.1.1 Google Pixel 5a // Android 11 ML v0.21.48 staging user-stg@ml.com / 123456 config reports v11 / one-time completion flow ML v0.21.48 prod test-user1@com.us schedule flows / my flow 1 idle time, flow 3 Applet password Qwe123!!!

natalia-muzyka commented 1 year ago

@binarybottle @WorldImpex I want to make sure that we are on the right way and interpreted a requirement for idle time / timer correct:

1 - when admin sets an idle time or timer, this setting should be applied to every activity in the flow, right? So if there is the 2 minutes timer added to the event, then user has 2 minutes for every activity?

2 - if #1 is yes, then after completing the timer / idle time, if activity in the flow has a visible report do we want to show the report first and let the user complete activity, or do we want to complete the activity and move to interim / thanks screen with skipping the Report summary screen?

Requirements: https://app.zenhub.com/workspaces/mindlogger-5e11094d0c26311588da9626/issues/childmindinstitute/mindlogger-admin/1552 image.png

anq83 commented 1 year ago

re. Summary(report) tech. details please review the last comments in the https://github.com/ChildMindInstitute/mindlogger-app/issues/2808 @binarybottle @WorldImpex @natalia-muzyka

WorldImpex commented 1 year ago

I agree this is a good first version. I responded on 2808

natalia-muzyka commented 1 year ago

Verified as fixed. For “Idle for activity” logic (sets in schedule): when time is over - user skipped to interim screen and starts next activity in flow, idle counter resets (starts again).

Environment: ML v0.21.57 iPhone 13 // iOS 15.6 Google Pixel 5a // Android 11