Actions
Defect #1295
openWiki Extensions vote macro problems
Description
There are some problems with this macro which makes it unreliable or unusable depending on context:
- One person can vote multiple times if he logs out then logs in
- There is no way to unvote if you accidentally clicked unwanted option. Clicking option again (perhaps after short period of time only) should switch vote direction.
- There are no mutually exclusive options: you can always vote for everything even if that doesn't make sense (for instance in
{{vote(yes)}} {{vote(no)}}
you can vote for both yes and no)
Updated by Miodrag Milic about 11 years ago
For mutually exclusive vote one syntax could for instance be
{{vote(vote1:yes)}} {{vote(vote1:no)}} {{vote(vote2:yes)}} {{vote(vote2:no)} {{vote(vote2:dont-know)}}
vote1/2
is required only to specify those options are connected and voting for one should prevent a vote for another one.
Updated by Haru Iida about 11 years ago
- Project changed from r-labs to Wiki Extensions
- Assignee set to Haru Iida
- Target version changed from 0.6.4 to 0.6.5
Updated by André Bachmann about 10 years ago
I want to add that the {{show_vote(...)}} macro is only working on wiki pages. If I create a vote like the following one on a new issue, the mentioned show_vote macro always shows 0:
{{vote(vote1, Yes)}} {{vote(vote2, No)}} {{vote(vote3, Don't know)}}
Option 1: {{show_vote(vote1)}} Option 2: {{show_vote(vote2)}} Option 3: {{show_vote(vote3)}}
However, if I'm about to add a new comment on an issue and use the show_vote macro and then preview my new comment, it seems to work! But as soon as I click OK, it only shows 0 on all vote options.
% ruby script/about bash-4.1# ruby script/about Environment: Redmine version 2.3.1.stable Ruby version 1.9.3 (x86_64-linux) Rails version 3.2.13 Environment production Database adapter Mysql2 Redmine plugins: redmine_wiki_extensions 0.6.3 redmine_wiki_lists 0.0.3
Actions