I'm using a form with a field type select+multi in a template topic. When creating a new topic based on this template topic, if a made a firts selection on that field, each time I edit this topic again the selection is not kept and I had to made it again. Though it works fine for a simple select.
--
TWiki:Main/EricCharikane
- 05 Oct 2007
Follow up, I remove the component configure, because I'm not sure it applies to it and set it to urgent because if people have already data in forms using select+multi after upgrading and editing those topics they wil lost all their data !
--
TWiki:Main.EricCharikane
- 11 Oct 2007
Eric
Can you please create a test case for us? Upload the topics (template, form and example topics).
You can clean out any confidential info from it but it really helps speed up fixing if we have a working example of the bad
--
TWiki:Main.KennethLavrsen
- 05 Nov 2007
The test case is quite simple: just create a form with a field 'test' of type 'select+multi' and values 'Foo,Bar,Baz'. I checked in 4.2-beta3 and it does indeed not select the proper values when editting a topic. The selection is stored though.
It is probably something simple, i'll dive into it asap (ie, coming weekend). I've been rooting around that code recently so it is still fresh in memory.
--
KoenMartens - 06 Nov 2007
Dear all, thanks for taking this out. The test case is exactly as Koen said. As soon as you add '+multi' to a select type field in a form. When creating a new node type using this form if you made mutiple selection during the creation, this selection is lost after editing this topic again.
--
TWiki:Main.EricCharikane
- 07 Nov 2007
Ok, fixed. It was indeed quite simple, the regular expression was wrong. However, i need to run unit tests before checking in, but i don't remember how to set them up. By the time i waded through five obsoleted Codev pages on unit testing, twiki.org went down. So for a 2 minute fix i already wasted half an hour on crap. motivation--
--
TWiki:Main.KoenMartens
- 11 Nov 2007
Fixed. There was also a problem with the unit test that tests rendering of forms, bad syntax resulted in two of the 4 tests being ignored. Fixed that, and added a test in the unit test to test for this bug.
Hi
KoenMartens, thanks for fixing this bug. It now works fine. Regards, Eric
--
TWiki:Main.EricCharikane
- 29 Nov 2007