1. What is the issue? Please be detailed.
With connectivity off and auto send on, or with auto send off, after completing a form and finalising it, it does not show up under ' Delete form' for possible deletion. It only shows under ' Ready to send', with options to select all or send selected.
Submission has the icon next to it to indicate finalised.
Use case is: Enumerator proceeds to finalisation before realising a critical mistake has been made (and future client_editable has not been enabled) and does not want to upload to server, rather wants to purge record, redo it, and to allow easy 'select all and send' later.
May also impact offline entities (Maybe entities are the reason)? If submission has updated the offline entity, how does this get walked back such that entity content is restored to before bad submission state?
If form must be sent and then rejected/deleted in Central, affected entity item will also need to be manually restored.
2. What steps can we take to reproduce this issue?
Turn auto send off or turn wifi/lte off, finalise a form, attempt to delete it.
3. What have you tried to fix the issue?
docs / forum search / app versions
My apologies, the behavior here is poorly documented! This is a form that creates or updates Entities, right? You got the idea -- if a submission creates or updates Entities, changes are made to the local, offline Entities representation when the submission is finalized. There possibly could be other changes to the same Entity stacked on top of that. For that reason, finalization really is final in the case of Entity-affecting forms AND we require sending it to the server so the server representation becomes consistent with the offline representation. We'll make sure to document that better and think about how we could give users more of an idea that this is happening.
For this same reason, client_editable does NOT apply to submissions that create or update Entities. Our alternative recommendation would be to introduce a separate form or a different mode in the same form that allows field staff to make edits to the Entity. You're right that this would lead to the original submission and the Entity diverging so you have to be explicit and intentional about what your source of truth is.
This will require some careful thought on whether a form should be allowed to update an entity, or only update certain aspects (i.e. don't change an item's metadata, but do change the status of 'last inspected/visited'). Then use separate tools downstream to update the entity/entities other fields once the submission content is approved/verified.
It seems like the immediate fix for the case of accidentally finalising a bad submission is to then create another submission with the correct content, which will update the entity correctly, and ensure the bad submission is rejected.
I hadn't thought that far ahead, but this means we have to choose between being able to edit and being able to update an entity. Currently a Collect submission can update an entity and that submission can be edited in Central without the edit affecting the related entity item - is the difference that Central edits are by their nature online and Collect may be offline? Is there a (distant) future where edits in either could do subsequent updates to the entity item?
Sorry, I wasn't clear. You CAN set client_editable for a form that creates or edits Entities but the edits only apply to the submission, not to the Entity, same as with Central. So you could have a workflow where you look for edits on the submissions and apply those to the corresponding Entity as appropriate.
It's something we've talked about but currently don't think we'll do. It's straightforward when the submission being edited is the latest to have contributed to the Entity but if there were other submissions that modify Entity properties in the mean time it becomes really confusing and there's a risk of accidental data loss.
Ah, ok! Still means I would have to be careful about what is allowed to be updated from the submission vs other processes but could be workable to trigger a notification that 'record x was edited, review changes and update linked entity if required'