Re-do the way drafts are saved
Opened this issue · 1 comments
Currently, the way we allow editing of forms is to copy the form onto a "draft" version and save that. There can be more than one draft per form, and each user can have one (and only one) draft. Each user can only see and edit their own draft.
This actually presents a problem: If more than one user has a draft of the same form, the latest person to save their draft will be the way the form looks from then on. For example, if user 1 starts a draft to continue working on it later, and user 2 starts a draft and then publishes it to add some questions to the form, and then user 1 picks the draft back up, the questions user 2 added will be deleted.
I cannot think of a good reason for every user to have their own draft, and in fact I think we should move to a system where each form can only have one draft. This prevents any accidental data loss. We could even say on the editing page which user was last working on the draft, so that departments could have communications about it.
I found a cool gem that may make things easier than we have them right now: https://github.com/liveeditor/draftsman
I did this in Jobapps first, if that PR is cool we can do the same thing here.