In the code snippet you provided, the line report.reported_date + 1 is part of a function called resolvedIf, which determines whether the task resolving condition is met.
In CHT, user-generated documents (contacts and reports) have reported_date which is a numerical value equal to the number of seconds that have elapsed since the Unix epoch (00:00:00 UTC on 1 January 1970).
So, report.reported_date + 1 means that the code is adding 1 millisecond to the reported date of the report that triggered this task. The purpose of this addition is to create a window of time that starts one millisecond after the reported date. It’s used to check if a certain form or action has been submitted within a specific time frame relative to the reported date. This could be a way to ensure that a certain action or form submission occurs within a particular timeframe after the report’s date.
In your case, both the source report (that triggered the task) and the action report (that the task will take you to) are of the same form i.e. screening_adulthood. So it’s important to ensure that the source report itself does not resolve the task it created.
cht-conf version 3.7.0 and above have a default resolving condition. If you skip the resolvedIf function from your task definition, the default resolving condition will still apply which looks almost similar to how your resolving condition works. However, please test thoroughly that your tasks work correctly if you decide to remove it.