-
-
Notifications
You must be signed in to change notification settings - Fork 49
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
Add button to 'Validate this feature' when clicking a feature on the map #1946
Comments
The problem here is we need the submission instance ID to redirect user to submission instance page (feature detail page). But from the project page, there's no way to access the submission instance id. Is it possible to attach the submission instance ID to the CC: @spwoodcock , @Sujanadh |
Damn, I hoped this would be a simple addition until we do the large validation workflow refactor, but you are completely right! For now, when the user clicks validate now, could we:
The reason I suggest this is that there could be multiple submissions for a feature! |
Doing that wouldn't follow our discussion to validate features by using the next button to validate another feature consequently. Creating another API to list the submission instances along with the entity ID might solve this? |
I think the 'next' based validation would only be on a task level, if the user clicks on a task then 'Validate Task'. On the feature level we wanted to go straight to the submission page, but I realise that's not possible as there may be multiple submissions per feature. Two options:
|
Yeah I was thinking about the first approach too! |
I was thinking about linking What I think would work for us is updating the |
But if a single entity has multiple submissions, it might not work. |
I love the idea! But as you say, the major drawback is if we have multiple submissions. The use case we imagine normally does only have one submission, but we could imagine a mapping campaign for say street level imagery collection, where the user might make multiple submissions for a single POI. If ODK supports it, then we should probably too! |
Plus that's a really tricky thing to do by the sounds of it! I think with any other field we could probably update an entity property on submission, but I imagine the submission uuid is generated on insert into the ODK database, so its not known at the point of submission. Its only after the submission is made it will have an id/uuid, so we may not be able to trigger the entity property update |
Actually, we can access the submission id in the form. Instance id is generated when the form is processed, so we can access it using |
I will start it all in python, from mandatory xls files to python. |
You mean we can make a calculated field to extract the submission ID and update an entity property on submit? What about the scenario of two submissions for one entity though? I noticed my message above was a but unclear! By 'if ODK supports it, we should to' I was referring to having multiple submissions for a single entity. Its not necessarily a 1:1 relationship |
I'm also scouring docs to find any way to reverse lookup submissions using the entity id! But it seems its not possible, outside of the approach you mention for linking 1:1 via form submission (injecting submission id into an entity property). Instead, is it not possible to go the other way and get the entity id from the submissions? Ideally the odata submission endpoint allows for filtering by entity id property, but I'm not sure if this is supported yet? We could get all submissions, then filter down, but that's a bit slow and not very elegant 😅 edit: double checked the docs and odata filter for user defined fields is still not possible |
I was about to comment and say: this could be an unsolvable problem, and we could reject doing this until there is a solution. But I think the solution you propose via the form submission linking is good enough, although not perfect. Workflow:
I can't think of an alternative! Let me know if I missed anything! 🙏 |
If making a new entity property, should it reflect the above by being named something like |
Damn! This is very useful info. The question is what is the final value if you get the entity from the API? Soft conflicts are just an indication for review, but the values are still updated to the latest submitted. This looks like a hard conflict though, which may cause an error and prevent the entity properties being updated. In the end, if the properties are updated to the values we need (despite the conflicts, which we can ignore), then everything should be fine. But if not, we need to go another route! |
The final value we get is the latest submission id 👍, and properties are updated too. |
Is your feature request related to a problem? Please describe.
The text was updated successfully, but these errors were encountered: