Open ramyaragupathy opened 1 year ago
The issue was that when a task was divided into smaller tasks, its history got copied to all those smaller tasks. This happened not only for the immediate children but also for their children if they were further divided. For example, if someone locked a task (let's call it Task 2) for 1 hour, and then this task was split into 4 new tasks (Tasks 4, 5, 6, and 7), the history was copied in a way that showed Tasks 4, 5, 6, and 7 were all locked for 1 hour by the same person at the exact same time. This caused the total time spent mapping to increase by 4 hours for that person.
To fix this issue we need to identify how can we preserve the task history of parent task without copying it over all of it's child task.
In the case of reporting user we saw huge jump in time spent mapping on July 11 and July 12.
In July 11 users time spent mapping was increased by 72.16 hrs let's have a look of what happened.
At 23:54:45.859 UTC user locked a task for mapping manually unlocking after 2 minutes. Later, this task was split into 13 smaller tasks. Because the history of the original task got copied to all these smaller tasks, it seemed as if user had spent 2 minutes on each of the new tasks increasing time spent mapping by 13 * 2 minutes = 26 minutes.
Then, at 23:57:21.209 UTC, one of the tasks that user had locked was automatically unlocked after 2 hours. In case of auto unlock we save task lock time as 2 hrs and this data is also used to calculate time spent mapping. As this task was divided into 34 smaller tasks, it appeared as if user had spent 2 hrs on each of the new tasks increasing time spent mapping by 34* 2 hrs = 68 hrs.
We observed a similar situation on July 12, where the total time spent mapping increased by 108.76 hours.
Recently, a mapper reported an unusual jump in time spent mapping. Upon initial investigation, there are entries in the task history table that shows multiple tasks locked for mapping at the same time. Technically, this is not possible since neither the TM API nor the frontend allows user to lock tasks multiple tasks for mapping. It is possible to lock multiple tasks for validation though.
@Aadesh-Baral is continuing investigation to verify if this is a bug in the codebase.