Hi Wouter, you can discuss about this being a bug or (un)wanted behaviour. If you change the poll, the answers or the question may change which is a reason to reset the answers. Otherwise you'd display voting results for answers the voters have not responded to. This is the reason why we implemented a separate function to toggle the online status so that the question and answers are untouched.
Jasha
-----Original Message-----
From: [EMAIL PROTECTED] on behalf of Wouter Zelle
Sent: Tue 1/8/2008 12:49
To: Hippo CMS development public mailinglist
Subject: Poll change erases votes
Hi,
I've found another bug in the Poll. If you edit the poll in the CMS, the votes
are erased. The problem seems to be that the Answer Id's are not properly used
in the form. The result is that new Answer-objects are created (and saved in
the DB).
I've fixed the issue by making this change in insertPoll.bnd.xml:
<fb:value id="id" path="answerId"/> -> <fb:value id="id" path="id"/>
and changing the following lines in insertPoll.bnd.xml:
<fd:field id="id" required="false">
<fd:label>ID</fd:label>
<fd:datatype base="integer">
<fd:convertor type="plain"/>
</fd:datatype>
</fd:field>
to:
<fd:field id="id" required="false">
<fd:label>ID</fd:label>
<fd:datatype base="integer"/>
</fd:field>
Regards,
Wouter Zelle
<<winmail.dat>>
******************************************** Hippocms-dev: Hippo CMS development public mailinglist
