-
Bug
-
Resolution: Fixed
-
Minor
-
4.3.5, 4.4.1
Basically it's an interplay with the user enrollment's timestart and timecreated. What should be happening is that if the enrollment has a timestart, that should be used as the reference point for the duration. But if there is no timestart, then instead the timecreated value should be used (since it is assumed the started when they were created).
But what is happening instead, is it is seeing if either timestart or timecreated (plus the duration time) has is in the past, and if either one is, it will mark the criteria complete. And again, because of the incongruity here, it is marking them with the correct completion time, but actually doing it at the wrong time. To hopeful make that more clear, I will use an example:
For this completion criteria, the required duration is 365 days.
On July 2nd 2023, someone created an enrollment record for the user. They have a start date of Aug 2nd 2023.
So because of this bug, the completion cron sees them as having completed the duration start on the night of of July 1st 2024, and when cron runs next, it will see them. But, because of how the record is processed, the completion time is correctly marked as being complete on Aug 1st, 2024 (365 days after the start date) - but that is in the future from the point in time that we are creating that completion record.