Skip to main content

Currently I’m working on a project where I need to capture survey responses for multiple survey in a single task. Each survey have multiple attachment type questions. During my testing I found that when I’m taking the first survey (with attachment type questions) there is no issue, but in the subsequent surveys when they’re reached at the end and I’m saving the surveys. It is syncing the responses of the previous surveys as well, and it is happening for rest of the survey. For example, if there are 25 surveys and the first survey is synced to the survey 25 time the 2nd survey 24 time and so on.

Here in this example: I’ve queried all responses for first survey (survey_id: 261), first question (question_id: 3295) and task id (61232), which should’ve only one response but in reality, there are 38 responses registered by server. If noticed properly the answers are exactly the same but creation time is different (i.e. at the end of each survey).

 

and if we look into the mobile sync, I can show you there is a lot of survey responses are synced at the same time. This screenshot is taken during the survey, and I can assure we don’t have any survey that exceed no. of question more than 15.

This thing is really causing a huge problem as we are proceeding with survey it keeps accumulating the responses so in our case we have 38 surveys and each have on average 15 questions so at the very end of the survey the device is trying to sync nearly 570 responses at a time and eventually causing the app to crash. And the same task mentioned earlier (task_id: 61232) with at most 570 questions registering more than 6000 responses in the survey result table.

 

This issue is only with attachment type survey if the type of question in a survey is other than attachment type this problem is not there.

 

Does anyone know what is causing the problem and what could be the fix?

Hi @subhodeep.mondal 

It is very hard to follow and understand

Can you provide the survey configurations?

Are you using the sub-survey / next survey feature?

Cheers!


Hi @Shneor Cheshin,

First the survey configurations, 

There are 38 surveys and they are configured as follows:

 

Each survey is configured the same way, all the surveys have attachment type question, there is no next survey or sub survey configuration, we’ve only maintained the ordering field to get the surveys in order.

 

So, the problem as follows, this survey I’ve attached above, is the first survey and it is assigned to Task Template ‘EU_OR_ISI_TSI,…...’

  1. I’m assigning the ‘EU_OR_ISI_TSI templated task to a mobile user, he completed the task workflow and get to the survey section.
  2. In the survey section, he is clicking the photos as required as per the survey question.
  3. Completing one survey and saving them one by one. *
  4. After completion of survey user get to the summary section and finishes the task.

*While user completes survey one after another as I described earlier, the previous survey responses are also synced to the server and that is reflected in the survey_result table.

So what it is happening in background is after completion of first survey the responses are synced (in this case images) then moving to the second survey when that survey is completed, it is syncing the responses of 2nd survey along with the responses of 1st survey synced earlier. At this moment if we check survey_result table from smart client for the particular task we would get 2 responses for each question of 1st survey and 1 response for each question in 2nd survey. If we keep continue with the survey the no. of responses to the 1st or 2nd or any subsequent survey is going to increase. 

This is causing the app to crash as with each completing survey it is trying to sync survey answers of its own and also the of previous surveys (which is not required, they’re synced already, the problem is here). 

This is what I’m trying to understand what is causing this to happen and how can I fix it, is it a bug or anomaly or some configuration mistake. Cause If I change the control type to anything other than ‘Attachment’ this issue is not occurring.


Hey @subhodeep.mondal 

According to the info you have provided it seems like a product bug.

I would recommend opening a support call.

Cheers!


Hi @Shneor Cheshin ,

Thanks for you help, I thought the same. As you confirmed I’m sure now. I’ll reach out to IFS support for the resolution.

Thanks,


Hey @subhodeep.mondal 

My pleasure. Please update the SC ID so we can follow.

Cheers!


Reply