Hi @Sanjit7
The task configuration parameter which controls when tasks get created is appliesIf
, you can find detailed explanations about this on the docs site: Understanding the parameters in the Task Schema | Community Health Toolkit
resolvedIf
is only called after the task gets created. A true
response from resolvedIf
will clear the task, while a false
response will keep it active.
The way your code works now, always returning false
when “bp1_eq_bp2” === “no”
means that your tasks will stay active for these reports, which is the opposite of what you’re looking for, as far as I understand.
Can you please try rewriting your task so that:
- you use
appliesIf
to filter out reports that havereport.bp1_eq_bp2 === 'no'
(tasks.js | Community Health Toolkit) - you rewrite
resolvedIf
to complete your task when the desired report is submitted
Please let us know about your progress!