maproulette / maproulette3

MapRoulette, the micro-tasking tool for OpenStreetMap
https://maproulette.org
MIT License
124 stars 33 forks source link

Tasks from deleted challenges being reported in API #2211

Open atiannicelli opened 8 months ago

atiannicelli commented 8 months ago

This is probably an API issue so feel free to move if necessary

If you read the output of https://maproulette.org/api/v2/tasks/box/-71.08040103202916/42.363936378907745/-71.06639896797085/42.375063128349666?sort=parent_id&order=DESC&cStatus=0%2C3 you will notice absolutely all of them have a status:0, however, you will see for example tasks from parent challenge 14932 which have themselves Task status = 0, but whose parent challenge is deleted (challenge status = 4).

The issue is: is there a way filter from /tasks/box/ that will return only tasks with non-deleted parent challenges? This would be great because Task information from /tasks/box/ does not itself come with parent Challenge status. I would have to make one /challenge/{id} API call for each of the tasks listed in /tasks/box/ to get parent challenge status, and that would be too much traffic for MR probably.

Expected behavior Expected to see tasks listed for challenges that are NOT deleted. Or at lease give us the ability to filter out deleted challenges.

To Reproduce https://maproulette.org/api/v2/tasks/box/-71.08040103202916/42.363936378907745/-71.06639896797085/42.375063128349666?sort=parent_id&order=DESC&cStatus=0%2C3 See that some tasks for challenge 14932 are listed even though that challenge is "deleted"=true

Screenshots NA

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

matkoniecz commented 4 months ago

yes, deletion (as often it is done) marks/flags item as deleted, without actually removing it (FYI, it is commonly done for various reasons, for example when you delete object in OSM it is also only hidden for view. The same for cases on other sites where it is more unexpected or nefarious)

matkoniecz commented 4 months ago

I would have to make one /challenge/{id} API call for each of the tasks listed in /tasks/box/ to get parent challenge status, and that would be too much traffic for MR probably.

I do it this way, for my family of challenges with about 20 000 tasks (and in my case I actually need info from deleted ones anyway).