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

Entities: consider options for updating feature mapping status #1417

Closed
spwoodcock opened this issue Apr 3, 2024 · 4 comments
Closed

Entities: consider options for updating feature mapping status #1417

spwoodcock opened this issue Apr 3, 2024 · 4 comments
Assignees
Labels
backend enhancement New feature or request Priority: Must have QA ready Any issues that is fixed

Comments

@spwoodcock
Copy link
Member

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

  • Adding entities has opened up new options.
  • We can now update entity fields directly from XLSForm questions.
  • For example the STATUS field could be updated to MAPPED at the end of a form.

Describe the solution you'd like

Option 1: via XLSForm field

Option 2: via FMTM:

  • When the user clicks 'start mapping' or 'finish mapping', we update the entity via the API accordingly.
  • This does not work well offline, less we optimise the PWA.

Additional considerations

  • We need to consider how we then update the Entity / feature info in FMTM.
  • If the user updates an Entity via ODK Collect form submission, then FMTM has no idea this is done, unless it calls the odata endpoint again.
  • Option 2 may be better in order to keep FMTM in sync for people mapping in the field.
@manjitapandey
Copy link
Collaborator

@spwoodcock Can you share some update about it and task breakdown for getting this feature done??

@spwoodcock
Copy link
Member Author

  • Create entities during project creation.
  • Replace code referencing geojson data extract, instead use entities.
  • When the user clicks a map feature, have a popup with a link to ODK Collect.
  • When the project details page is loaded, colour the buildings based on their Entity status field.
  • When the user clicks Open in ODK Collect the building status should be changed to LOCKED_FOR_MAPPING.
  • The feature status should be changed to MAPPED on two conditions (they do the same thing, as a failsafe):
    • When the user clicks Mark Complete on the feature popup in FMTM.
    • Automatically via the XForm when it is marked as complete (automatically trigger Entity status update).

@manjitapandey
Copy link
Collaborator

  • Create entities during project creation.

  • Replace code referencing geojson data extract, instead use entities.

  • When the user clicks a map feature, have a popup with a link to ODK Collect.

  • When the project details page is loaded, colour the buildings based on their Entity status field.

  • When the user clicks Open in ODK Collect the building status should be changed to LOCKED_FOR_MAPPING.

  • The feature status should be changed to MAPPED on two conditions (they do the same thing, as a failsafe):

    • When the user clicks Mark Complete on the feature popup in FMTM.
    • Automatically via the XForm when it is marked as complete (automatically trigger Entity status update).

Thank you @spwoodcock , This helps me understand the task better and get updated.

@spwoodcock spwoodcock added the QA ready Any issues that is fixed label Apr 19, 2024
@spwoodcock
Copy link
Member Author

spwoodcock commented Apr 19, 2024

This is an endpoint we can call now to update the Entity mapping status: POST projects/{project_id}/entity/status.

It takes JSON params:

{
  "entity_id": "string",
  "status": 0,
  "label": "string"
}

The remaining tasks above I will put in another issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend enhancement New feature or request Priority: Must have QA ready Any issues that is fixed
Projects
Development

No branches or pull requests

2 participants