Open JoltCode opened 8 months ago
Massive thanks to Ralph from the Tasking Manager Meetup for catching this 🐛!
I believe this might be where the bug is: https://github.com/hotosm/tasking-manager/blob/547e0ce706d40d680c774803828ae8c6a5cebf62/backend/services/stats_service.py#L43-L116
Could also be the function that calls these, it might be calling it with bad data or something....?
@JoltCode - thanks so much for quickly capturing the discussion from our working group meeting. Would you be interested in working on a fix for this?
@JoltCode - thanks so much for quickly capturing the discussion from our working group meeting. Would you be interested in working on a fix for this?
Yeah, although not sure if your team would be better at fixing this - the code for incrementing the stats is a little hard to understand... Perhaps we could discuss over Slack?
Thank you @JoltCode . @ramyaragupathy let us know who from the Naxa team might be able to look into Joe's initial investigation and then collaborate. Happy to then connect them on Slack if needed.
Thank you @JoltCode . @ramyaragupathy let us know who from the Naxa team might be able to look into Joe's initial investigation and then collaborate. Happy to then connect them on Slack if needed.
Sounds great! Thanks 👍
I always thought that those 91 tasks just wasn't validated yet :D
I always thought that those 91 tasks just wasn't validated yet :D
That's interesting if so - the assumption in the TM call was that there was some sort of bug, as the equivalent on the validation stats side (on the right) is an addition of the two other numbers.... Hmmm.... Either way, we should probably find out what this stat is haha 😅
I thought this is about the number of tasks i mapped on total as a user and second showing the number of tasks i validated. Similarly, the third one is telling me about the number of tasks which were failed to validate. So i never thought that as an issue. Am i wrong on this case??
I thought this is about the number of tasks i mapped on total as a user and second showing the number of tasks i validated. Similarly, the third one is telling me about the number of tasks which were failed to validate. So i never thought that as an issue. Am i wrong on this case??
I don't think that's right, because the first number doesn't actually seem to be the total of any other two numbers on the page, but yeah the third number is the total of tasks which required more mapping (after a failed validation).
As you can see, 85+25
does not add up to 104
@JoltCode what i meant there was the first number means total number of mapping i have done as a mapper and second one means total number of tasks in which i performed the validation. This way it is not needed to be 85 + 25 = 104. Seeing that way there should be 104 mapped 85 validated 25 needs more mapping This could be confusion created by words.
@manjitapandey There is a separate section for tasks that the user validated
Also when it goes for "needed more mapping" under "You mapped" those will be probably tasks that had been marked as "More mapping needed" before I locked them for mapping (I am fixing invalidated task mapped by someone else then me).
Since we haven't incorporated tasks mapped but not validated. the number of total tasks mapped won't be equal to number of tasks validated + no of tasks needing more mapping. However issue still exists since number of tasks should be greater then adding later two.
@JoltCode @ramyaragupathy
If the first number is the total tasks mapped then that number should only be equal to or greater than the other two numbers. It will not always be that all the mapper's tasks will be validated or invalidated as some projects have been archived before the validation process has been completed.
The screenshot shows that this is not the case as the number of validated tasks is greater than the total number of tasks.
The only logic I could see for this is the first number is the number of tasks that have not been checked. The second number is the total number of tasks that have been validated. The third number is the tasks that have been invalidated. If this is correct then the total number of tasks would be all three added together and the first number could be more/equal to/or less than the sum of the others.
If this is the case then the numbers could be correct then the wording needs to show this.
This could then also explain the same inconsistencies in the numbers for "You validated"
Describe the bug On the stats page for the user, you can see that the total tasks does not add up correctly:
We can see here that
82 + 25
does not add up to91
.We can see that the addition is handled differently between the "You Mapped" section, and the "You Validated" section. https://github.com/hotosm/tasking-manager/blob/547e0ce706d40d680c774803828ae8c6a5cebf62/frontend/src/components/userDetail/elementsMapped.js#L33 https://github.com/hotosm/tasking-manager/blob/547e0ce706d40d680c774803828ae8c6a5cebf62/frontend/src/components/userDetail/elementsMapped.js#L51
To Reproduce
validated
" + "needed more mapping
"Expected behavior The numbers should add up correctly, or, it should be clear why the "validated stats" addition is different to the "you mapped stats" addition.
Screenshots N/A Desktop (please complete the following information): N/A - No reason why it should or may be different across different devices.
Additional context N/A - May be related to our migration to ohsome stats and that the old stats being broken? Not sure. This may also be a backend issue, rather than a stats backend issue.