Tasks re-trigger

Hi,

I have been struggling for checking how possible to re-trigger the task. Because we have some accounts that has no task showing when logging in the app.

We don’t have much changes in the tasks.js

and once they are logging in this is the view on the tasks tab.

We have done Preloading of data for the accounts in the backend using medic-conf commands.

Is that really a possible cause when we do the preload and instead of recording it at front, we do it at the back, so that is why we can’t trigger the tasks for them?

or is there a medic-conf command that when we run it all the tasks will be triggered?

1 Like

Hi @Marcelo_De_Guzman

Task calculation should be triggered when the user first logs into the app. Tasks are also recalculated every 7 days, when changes are made to task config and, relevant tasks are recalculated when user actions happen (new reports, creating and editing contacts).

If no tasks are showing up when you first log in, after initial replication, I would double check task configuration, user roles and user data (what is loaded on the device).

Hi diana,

Thank you for responding my issue,.

Is this the file you needed or do you need other more file for checking ?
Javascript files including tasks.js, app_settings.js,contact-summary, etc.

Hi @Marcelo_De_Guzman

I don’t have access to those files. If they are ok to be public, please share them in a public place (like github or even pastebin) so others who follow the forum can see.
After logging in, can you check that the users have the expected documents?

tasks.js
app_settings.js

For the expected documents. How do I check that one? What are the steps on checking that?

-Thank you for helping me. I am just new here to develop my company medic-mobile.

Once logged in, do you see the expected contacts in the contacts page? The expected reports in the reports page?
Pick one of your users, and check the preloaded data, and assess what documents you expect that user to download. From there, pick a task that should be displayed for that user.
If the task is not displayed, check which reports/contacts should trigger that task and search for them on the user’s device.