create new tag
, view all tags
There is a nasty problem when you change forms; there is a risk of data loss.

  1. Create a form with a field called ManWithRedShirt
  2. Create a topic that uses the form. Populate it with data and save it.
  3. Edit the form and delete the ManWithRedShirt field row, and save it
  4. View the topic. Everything looks good, yes? Now edit it.
  5. In best Star-Trek tradition, ManWithRedShirt has been eaten by aliens, taking all your carefully crafted data with it.
  6. If you then save the topic, even a carefully focused transporter beam won't bring it back.

Of course, you can go "back" and copy-paste the data to a safe place. But that's really not a very elegant solution; you may not even realise it has gone. So here are a couple of possible scenarios covering the situation where a FIELD is in META but no longer in the form def for you to consider:

  1. the lost key/value pair(s) are silently added to the end of the text
  2. the lost key/value pair(s) are listed before the form table, in bright red with a message saying they are going to be deleted if the topic is saved.

-- CrawfordCurrie - 08 Apr 2005

Hmmm. Interesting question. Easy to detect to when the data is about to be lost... we would just need to find a good user interaction model here.

  1. Your first suggestion will look ugly but preserves the data.
  2. Your second suggestion does not really get you the data, but you can find it by going back in the browser (assuming the form is actually shown, which is not a given... a template might decide not to render the form.

But thinking some more about it... the form is an application which keeps structured data. If the structure changes so that ManWithRedShirt is not part of the structure, the data related to ManWithRedShirt should cease to exist, shouldn't it? (I would have called it GuyWithoutAName... as in the great sci fi parody Galaxy Quest...)

-- ThomasWeigert - 08 Apr 2005

My main issue is with the following use case: The originator of the form creates the field ManWithRedShirt, but a GalaxyQuest fan comes along and renames the field to GuyWithoutAName - same data, different key, but data is thrown away all the same.

Note that if you are lucky enough to be using RCS you will still be able to get the data from the history - if you realise it is missing - but it will of course have disappeared from searches.

-- CrawfordCurrie - 09 Apr 2005

Would it help if, instead of writing:

% META:FORM{name="ChangeProposalForm"}%
% META:FIELD{name="TopicClassification" title="TopicClassification" value="BugReport"}%
% META:FIELD{name="TopicSummary" title="TopicSummary" value="Form data gets eaten by aliens if the form def is changed"}%

We embedded the form name in every key and wrote:

% META:FIELD{form="ChangeProposalForm" name="TopicClassification" title="TopicClassification" value="BugReport"}%
% META:FIELD{form="ChangeProposalForm"  name="TopicSummary" title="TopicSummary" value="Form data gets eaten by aliens if the form def is changed"}%


-- MartinCleaver - 09 Apr 2005

It might help. That is a good idea for another reason as well; it allows the support of multiple forms in a topic. But it's a major rewrite of the Forms support.

-- CrawfordCurrie - 09 Apr 2005

Yea for AllowMultipleForms!

-- LynnwoodBrown - 09 Apr 2005

I don't think adding the form name to the field definition helps when the form layout itself is changed. It would help avoid data loss when the form is swapped for another form (or removed altogether).

-- ThomasWeigert - 10 Apr 2005

Crawford, if you only allow editing for one form at a time this is not as big a rewrite. The format Martin describes is very similar to the format we use in SimpleTableEntryUsingForms, and this already allows multiple tables per topic.

The issue is more one of deciding whether the form application is a different application from the white board application, and how to integrate multiple forms in the user interface. This is where most of the changes will be... how do we add another form? do they just get added at the bottom one by one? can they be in the text? etc.

The requirements need to be worked out.

-- ThomasWeigert - 10 Apr 2005

See RequirementsForMultipleFormSupport

This will not be solved before we do multiple forms per topic.

-- CrawfordCurrie - 10 Apr 2005

Edit | Attach | Watch | Print version | History: r9 < r8 < r7 < r6 < r5 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r9 - 2005-04-14 - CrawfordCurrie
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.