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

New map geometry drawn doesn't contain taskID #2105

Closed
manjitapandey opened this issue Jan 23, 2025 · 8 comments
Closed

New map geometry drawn doesn't contain taskID #2105

manjitapandey opened this issue Jan 23, 2025 · 8 comments
Assignees
Labels
backend Related to backend code bug Something isn't working dependency:osm-fieldwork Requires updates in osm-fieldwork effort:low Likely a few hours priority:high Should be addressed as a priority testing:ready Ready for testing

Comments

@manjitapandey
Copy link
Contributor

Describe the bug
When user draw new geometry in field during data collection, the task ID is not associated with the created entity.

To Reproduce
Steps to reproduce the behavior:

  1. Go to mapper's page
  2. Click on any task and new map feature
  3. Submit form through odk
  4. Get to submission details page of FMTM
  5. See error

Expected behavior
The new geometry should also include taskID.
Also the submission details page should be refined for those submission linked with newly created geometry. The coordinates is listed which doesn't provide specific meaning

Screenshots

Image

Image

Additional context
Add any other context about the problem here.

@manjitapandey manjitapandey added the bug Something isn't working label Jan 23, 2025
@spwoodcock
Copy link
Member

spwoodcock commented Jan 23, 2025

Remind me again, do we need the assigned task id for anything in particular?

If its about displaying on the submission table, then its actually a positive having no assigned task id, as it shows the geom was newly created.

But I feel we already encountered this is before on the react frontend and have discussed it somewhere. It should be an easy fix hopefully, just adding task_id to the ODK intent url

@spwoodcock spwoodcock added priority:high Should be addressed as a priority frontend Related to frontend code effort:low Likely a few hours labels Jan 23, 2025
@manjitapandey
Copy link
Contributor Author

manjitapandey commented Jan 23, 2025

So if there is no taskID, we will have difficulties to filter the submission based on taskID. And we will be needing the project ID in tasks level feature wise validation workflow which we are thinking as per in person discussion. So I believe, we need TaskID in new entities as well.

But you also have got point, managers will be interested in knowing which were the features latter added by mappers during field mapping. we need to think of something to differentiate new geometries as well.

@spwoodcock
Copy link
Member

So if there is no taskID, we will have difficulties to filter the submission based on taskID. And we will be needing the project ID in tasks level feature wise validation workflow which we are thinking as per in person discussion. So I believe, we need TaskID in new entities as well.

But you also have got point, managers will be interested in knowing which were the features latter added by mappers during field mapping. we need to think of something to differentiate new geometries as well.

There is the new_feature=true field for the submission, plus we are logging new geoms to the geometrylog table after recent changes.

Adding the task id and project id should be easy enough via Collect intent, or Web Forms 👍 (the only time I think project id is useful is if the user visualises multiple sets of data together, such as the case of a dashboard made to overview Tokha projects)

@NSUWAL123
Copy link
Contributor

@spwoodcock can you confirm what is the query key for passing the task id? I tried with task_id and task_filter but both didn't work. The task id on viewing submission is showing null task id.
ODK intent URL during test:
odkcollect://form/6e060194-d334-4c2f-8def-49699461d3c6?new_feature=27.731048736%2085.32769391%200.0%200.0;27.731005172%2085.327682973%200.0%200.0;27.73098581%2085.327622818%200.0%200.0;27.731048736%2085.32769391%200.0%200.0;&task_filter=77 or &task_id=77

@spwoodcock
Copy link
Member

Ah thanks for testing!

Its due to the form logic
https://github.com/hotosm/osm-fieldwork/blob/52edda17662c6532180288e4f7d3dc947e2a2406/osm_fieldwork/form_components/mandatory_fields.py#L143

We can no longer inject the task_id field as its calculated from the existing entity task_id field 😅

I'm not sure there is a way to make the same field handle both scenarios. Perhaps we need a new field in the form called new_task_id with a save_to column entry to task_id

@spwoodcock
Copy link
Member

Could you add the task_id to the URL please @NSUWAL123 and then we will update the osm-fieldwork code to fix this 🙏

@spwoodcock spwoodcock added backend Related to backend code dependency:osm-fieldwork Requires updates in osm-fieldwork and removed frontend Related to frontend code labels Jan 27, 2025
@NSUWAL123
Copy link
Contributor

Sure!

@spwoodcock
Copy link
Member

Closing in favour of #2146

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Related to backend code bug Something isn't working dependency:osm-fieldwork Requires updates in osm-fieldwork effort:low Likely a few hours priority:high Should be addressed as a priority testing:ready Ready for testing
Projects
None yet
Development

No branches or pull requests

4 participants