-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement --votes=0 setting to vote all options even if adding an option #506
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #506 +/- ##
==========================================
- Coverage 93.27% 93.19% -0.09%
==========================================
Files 13 13
Lines 1650 1630 -20
==========================================
- Hits 1539 1519 -20
Misses 84 84
Partials 27 27 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we bump the minimum server version to v9.3.0 so it includes mattermost/mattermost#24916?
votedAnswers := poll.GetVotedAnswers(userID) | ||
remains := poll.Settings.MaxVotes - len(votedAnswers) | ||
if poll.Settings.MaxVotes == 0 { | ||
remains = len(poll.AnswerOptions) - len(votedAnswers) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0/5 do we even want to show the number of remaining votes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not required, but I think that giving feedback on how many options users have already voted for (= remaining votes) is better than nothing.
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
It seems to me that v9.3 is too new and I concerned that a number of users could be unable to launch Matterpoll v1.7. mattermost/mattermost#24916 occurs only in dialog, not in command, so ESR v8.1 (or v7.8) looks better. |
fixes #496
refs #372
--votes=0
setting allows users to vote all options even after adding an option.Notes: When creating a poll from interactive dialog,
0
cannot be set toNumber of Votes
due to mattermost's issue. Until resolving it,--votes=0
setting can be used only from/poll
command.