Youmna
June 22, 2023, 1:18pm
1
I was checking an archived form for which the data collection was finalized and noticed that the form was replaced after being archived.
I suggest, for replacement of archived forms, to add a pop-up message or to oblige the user to unarchive then replace.
Moreover, in case the replacement was done without unarchiving the form, I think it is better to show the last deployed questions in the header of the dataset and not the one uploaded later.
Welcome to the community, @Youmna ! Thank you for bringing this to the community! I have put the discussion with the team. I will get back to you once I have anything ready to be shared.
1 Like
@Youmna , we have a GitHub issue for this. You should be able to follow it here:
opened 08:17AM - 24 Jun 23 UTC
bug
Front end
## Description
The frontend is using the latest form version to display the q… uestion labels rather than the latest _deployed_ version in at least the following sections:
- Table view,
- Single submission modal,
- Bulk edit modal,
- Exports, and
- Map
This results in unexpectedly missing or additional labels when a form has draft changes that are yet to be deployed.
## Steps to Reproduce
1. Create a V1 form with the following structure and deploy ([XLSForm](https://github.com/kobotoolbox/kpi/files/11855912/v1.xlsx)).
**survey**
| type | name | label |
| --- | --- | --- |
| text | name | What is your name? |
| integer | age | What is your age? |
2. Submit some data.
3. Create a V2 form with the following structure and **do not** deploy ([XLSForm](https://github.com/kobotoolbox/kpi/files/11855913/v2.xlsx)).
**survey**
| type | name | label |
| --- | --- | --- |
| text | name | What is your name? |
| geopoint | location | Where are you? |
4. Observe the missing "What is your age?" question and the additional "Where are you?" question.
## Expected behavior
Only the latest deployed version's questions are used in each of these UI sections.
## Actual behavior
The latest version (not necessarily deployed) is used.
### V1
- Table view
<img width="1092" alt="v1 table view" src="https://github.com/kobotoolbox/kpi/assets/50016008/0b51f3d6-a792-4f67-9346-e2a34fa24e4f">
### V2
- Table view
<img width="1105" alt="v2 table view" src="https://github.com/kobotoolbox/kpi/assets/50016008/62ad8c87-5494-4ee4-88ec-d9a142892b36">
- Single submission modal
<img width="1307" alt="v2 single submission modal" src="https://github.com/kobotoolbox/kpi/assets/50016008/ef9e05e5-7ee8-4c2a-9cfb-6059c83aa711">
- Bulk edit
<img width="1067" alt="v2 bulk edit" src="https://github.com/kobotoolbox/kpi/assets/50016008/7a8cc365-f21b-4eeb-a342-1948e3bafdbd">
- Export
<img width="1044" alt="v2 export" src="https://github.com/kobotoolbox/kpi/assets/50016008/580a0a78-cbaa-436b-af76-6286b72934bd">
- Map
<img width="608" alt="v2 map" src="https://github.com/kobotoolbox/kpi/assets/50016008/71ade546-603a-4b44-b8a9-e11694779212">
## Additional details
- [Zulip discussion](https://chat.kobotoolbox.org/#narrow/stream/6-Support/topic/Frontend.20issues.20with.20form.20versions/near/242581)
- [Community forum post](https://community.kobotoolbox.org/t/archived-forms-can-be-replaced/42339)
## Related issues
- #3499
- Partially related:
- #2532
- #3508