Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error message when selecting "More Mapping Needed" task #6578

Open
Geocruizer opened this issue Sep 26, 2024 · 4 comments
Open

Error message when selecting "More Mapping Needed" task #6578

Geocruizer opened this issue Sep 26, 2024 · 4 comments

Comments

@Geocruizer
Copy link

When a project is 100% mapped, and a task is marked as More Mapping Needed, when you select that task I get the following error message:
"No mapped tasks selected
It was not possible to lock selected tasks, as none of them are on the mapped status"

If a project IS NOT 100% mapped, and a task is marked as More Mapping Needed, I'm able to select that task and start mapping.

Examples
ERROR https://tasks.hotosm.org/projects/17204
NO ERROR https://tasks.hotosm.org/projects/14735

Mac Sonoma, Chrome 129.6

@manjitapandey
Copy link

manjitapandey commented Oct 28, 2024

If the project is 100% mapped then there shouldn't be any tasks that should be available for mapping which also includes more mapping needed. May be its due to lagging in the update of status of that task. I couldn't replicate the issue using the provided project since its already 100% mapped and validated. Also i tried replicating it on on my own environment, It turned out the project isn't 100% mapped if any task is labelled as more mapping needed.
image

@martien-176
Copy link

martien-176 commented Dec 7, 2024

https://tasks.hotosm.org/projects/18133/tasks?search=71

It looks like this issue is happening here too.

Although the project is not 100% mapped.

Image

Image

@Geocruizer
Copy link
Author

It's also happening on the Rapid version of TM. Seems there is a discrepancy between how much mapping is left on the "Explore Projects" page vs the actual project as you can see from these two images.Image
Image

@tsmock
Copy link
Contributor

tsmock commented Dec 9, 2024

When stepping through https://tasks.mapwith.ai/projects/165/tasks?page=19 in the Firefox debugger:

  • In projectPermissions#getTaskAction, the project.percentMapped is 100. This means that mappingIsPossible is false.
  • Looking at the relevant api call ( curl https://api-mwai-tasking-manager-production-tasks.mapwith.ai/api/v2/projects/165/queries/summary/ ), we get a return with "percentMapped": 100. Reduced json:
{
  "projectId": 165,
  "percentMapped": 100,
  "percentValidated": 1,
  "percentBadImagery": 0,
}
  • The calculations for the summary are done in project_service.py#get_project_summary, and are not cached
  • The mapped percentage is calculated as follows:
            if target == "mapped":
                return int(
                    (self.tasks_mapped + self.tasks_validated)
                    / (self.total_tasks - self.tasks_bad_imagery)
                    * 100
                )
  • The parameters are stored in the table
  • Using curl https://api-mwai-tasking-manager-production-tasks.mapwith.ai/api/v2/projects/165/tasks/ | jq '.features.[].properties.taskStatus' | sort | uniq -c, we get:
 119 "MAPPED"
  54 "READY"
 101 "VALIDATED"

I suspect that one of the following is true:

  • total_tasks is wrong
  • tasks_bad_imagery is wrong
    Unfortunately, I cannot check the values for the project @Geocruizer is referring to due to various safeguards. But one of the variables has to be missing updates.

EDIT: Total tasks look "good" based off of https://api-mwai-tasking-manager-production-tasks.mapwith.ai/api/v2/projects/165/contributions/queries/day/ (274).
EDIT2: tasks_bad_imagery should be 0 for MapWithAI TM 165. So the denominator should be correct.

tsmock added a commit to facebook/OSM-HOT-Tasking-Manager that referenced this issue Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants