SEL-Columbia / formhub

Mobile Data Collection made easy.
http://formhub.org
BSD 2-Clause "Simplified" License
259 stars 163 forks source link

Improve error message for IntegrityError when publishing a survey for the second time. #36

Closed amarder closed 13 years ago

mberg commented 13 years ago

Mark had some excellent ideas on this. Mark can you elaborate.

On Wed, Oct 26, 2011 at 1:29 PM, amarder < reply@reply.github.com>wrote:

Reply to this email directly or view it on GitHub: https://github.com/modilabs/formhub/issues/36

mejymejy commented 13 years ago

Hmmm here goes...

I think it would make sense to separate the idea of a survey that the user is trying to perform from the actual form that is generated and used on the phone. If we add an extra level of containment such as a survey can have multiple form versions, then we can actually save all of the forms as they are now, and sort of group them in a versioned fashion under the survey. The user can "add a new version" or maybe simply "update your survey form." This would save a completely new form with it's own id and version number under the given survey. This way we would have less of a need to delete old forms (just make a new version) and could continue to collect data for a given survey using an older version of the form (for example, maybe all the phones are not up to date). One thing that might be necessary would be to embed the version id inside the xform such that submissions to the user's url could be directed to the correct survey form version. There may need to be some trickery to make sure that the forms show up on the phone in a nice way (my form (v1) or whatever). The nice thing about this, though, is that it keeps the user thinking about the continuity of their data collection as surveys whereas the backend can see things as separate for the needs of data integrity and uniqueness of ids. What is more is that you would have all of the versions of the forms/data together and could export all of them if you wanted to attempt to merge them offline.

Anyways, I am sure there are other issues, but I think that something along these lines would make sense. Would like to know your guys' thoughts/feedback. Maybe a skype call or something would be better...

amarder commented 13 years ago

I vote to move back to delete actually deleting XForms. We should give users two options:

  1. Archive, this will act like archiving in gmail. The form will be moved out of the inbox so it won't show up on the front page, but we can look at all forms by clicking all forms.
  2. Delete, this will delete the form and everything connected to it. It sounds like users need to be able to delete surveys, we just have to make the warning message is clear about what they're deleting.

Having delete not actually delete has been getting in the way of how this application works.

I do like the idea of a survey having multiple versions and all those versions being merged together well, but that's going to be extremely difficult to implement. We'd have to do data migrations for XForms. Think about how hard south is to use, and then think about implementing south for XForms, that's a big project. I think we could get a hack job working, but it will be more confusing for users than not having it.

Andrew

On Wed, Oct 26, 2011 at 2:25 PM, Mark Johnston reply@reply.github.com wrote:

Hmmm here goes...

I think it would make sense to separate the idea of a survey that the user is trying to perform and the actual form that is generated and used on the phone.  If we add an extra level of containment such as a survey can have multiple form versions, then we can actually save all of the forms as they are now, and sort of group them in a versioned fashion under the survey.  The user can "add a new version" or maybe simply "update your survey form."  This would save a completely new form with it's own id and version number under the given survey.  This way we would have less of a need to delete old forms (just make a new version) and could continue to collect data for a given survey using an older version of the form (for example, maybe all the phones are not up to date).  One thing that might be necessary would be to embed the version id inside the xform such that submissions to the user's url could be directed to the correct survey form version.  There may need to be some tricke  ry to make sure that the forms show up on the phone in a nice way (my form (v1) or whatever).  The nice thing about this, though, is that it keeps the user thinking about the continuity of their data collection as surveys whereas the backend can see things as separate for the needs of data integrity and uniqueness of ids.  What is more is that you would have all of the versions of the forms/data together and could export all of them if you wanted to attempt to merge them offline.

Anyways, I am sure there are other issues, but I think that something along these lines would make sense.  Would like to know your guys' thoughts/feedback.  Maybe a skype call or something would be better...

Reply to this email directly or view it on GitHub: https://github.com/modilabs/formhub/issues/36#issuecomment-2534089