hotosm / fmtm

Field Mapping Tasking Manager - coordinated field mapping.
https://fmtm.hotosm.org/
GNU Affero General Public License v3.0
37 stars 42 forks source link

Colour map features based on mapping status #1468

Closed spwoodcock closed 1 week ago

spwoodcock commented 4 weeks ago

@manjitapandey

Is your feature request related to a problem? Please describe.

// This is a list
[{
  "id": "string",  (the Entity ID)
  "osm_id": "integer",  (the feature/OSM ID)
  "status": 0,  (the TaskStatus enum value)
  "updated_at": "string"  (a datetime string)
}]
{
  "entity_id": "string",
  "status": 0,
}

Describe the solution you'd like

Change the mapping status for a feature:

Colour the features based on status:

Describe alternatives you've considered

NSUWAL123 commented 2 weeks ago

@spwoodcock, before proceeding, I have some queries:

Query 1:

When the user clicks the Map Feature In ODK button, the new status LOCKED_FOR_MAPPING (1) should be POSTed to the entity status endpoint.

So if a user clicks the Map Feature In ODK button, we should update the feature status to locked_for_mapping where if it's on mobile it should open ODK and if its desktop it should redirect to playstore.

Query 2:

The button in the popup should also change based on the Entity status. Similar to the task actions. The next button should be Mark As Mapped, to change the status to MAPPED.

Whats the significance of adding Marked as Mapped button? What if the user doesn't make submissions via ODK and clicks the Marked as Mapped button?

spwoodcock commented 2 weeks ago

Query 1: you are exactly right! On mobile it should attempt to load the entity via intent. Or failing this, hopefully it at least opens ODK Collect for the user to select the form.

Query 2: the feature can be marked as MAPPED both through FMTM and automatically on ODK Collect submission. The reason I suggest having both, is so the user sees their mapping progress in realtime, without having to reload the /entities/statuses endpoint. If they map in ODK Collect, the status will not be reflected in FMTM unless they refresh the page.

NSUWAL123 commented 2 weeks ago

So what if the user doesn't make submissions via ODK and only clicks the Marked as Mapped button?

spwoodcock commented 2 weeks ago

Then it's user error - I'm not sure we can account for that! 😆