maproulette3 icon indicating copy to clipboard operation
maproulette3 copied to clipboard

Tasks from deleted challenges being reported in API

Open atiannicelli opened this issue 2 years ago • 2 comments

** 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):

  • OS: iOS
  • Browser chrome
  • Version
    • MapRoulette [v3.14.2]
    • MaprouletteAPI [v4.4.11]

Additional context Add any other context about the problem here.

atiannicelli avatar Dec 15 '23 18:12 atiannicelli

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 avatar Apr 24 '24 10:04 matkoniecz

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).

matkoniecz avatar Apr 24 '24 10:04 matkoniecz