I cloned a shared form (undeployed), and then also created a new form to build from scratch.
Somehow, in building the new form, it overrode not just the clone, but the original shared form too - changing the title as well as the questions. It changed the shared form for all users, not just myself.
Leaving me with 2 rather than 3 undeployed projects.
I can (and will) raise this as a bug, but if there is any way to roll-back the form, I would really appreciate the help as we need to deploy it for pilot testing today, and I may need to recreate it otherwise.
I have already tried this - and there are no versions showing:
Welcome to the community, @samforsberg! Maybe you could go to the FORM. Under the FORM you could select Form history and see the versions you wish to Clone. Then you could clone the appropriate version you wish to have for your survey project.
Thank you for showing me where Form History should be visible, as I’d been unable to locate it. Unfortunately, this form does not have any history showing other than v1:
@jnm - I have managed to find a json file of the form version that needs to be reinstated, but cannot find how to do this or message @staff as suggested in a community post.
I need this fixed asap - could you please help?
As demonstrated in my original post, there were no versions showing in my Asset Version List. I managed to access the json via my colleague’s account, but the Get XMLs option was returning an error message.
In the UI, we only show deployed versions in the history. This is a known limitation that we would like to fix. What I believe happened in this case is that a form had various revisions without ever being deployed (as shown in this screenshot)—and we do store these—but we don’t offer any way to recover them in the UI.
Something is wrong with cloning a form and subsequently editing a new form, where the new form somehow overwrites the previous one. This sounds like a serious issue that we’ve never heard about before, and any help you can provide, @samforsberg, in the form of reproduction steps would be very much appreciated.
To get out of the current predicament (revert the form content now that you’ve found the correct JSON), you need to manually PATCH the JSON to the asset where it belongs. I’ll show an example where I’ve created a form with only one question; I’ll then overwrite that form with different JSON content.
The “raw data” form shown at the asset detail endpoint for this form, https://kf.kobotoolbox.org/api/v2/assets/ab72MkqfFN8g3aY4SvnhT2/ (observe use of form UID in the URL):
I’ll now erase everything from the “Content:” box and replace it with my desired form JSON surrounded with the following context:
{"content":
PASTE FORM JSON HERE
}
Don’t worry about making the indentation consistent, but make sure you include the closing curly brace at the end. In my example, the form JSON with context looks like:
Before the next step, make sure neither you nor anyone else who has edit access to the form has the form open in a tab where they might accidentally click SAVE. If they save the broken form after you’ve done the next step, they will undo all of your work.
Click the blue PATCH button;
Once the page reloads, look for “CURRENT ENDPOINT”. I’d suggest using Control/Command+F in your browser. You should see PATCH /api/v2/assets/YOUR-FORM-UID/ followed by HTTP 200 OK, for example:
At this point, your form should be restored. You can navigate away from the API endpoint or close the tab and return to the normal UI: