Add a poll quick action to GitLab aka discussion polls
Proposal
Full support for polls in Gitlab, particularly useful for estimation meetings, but also getting votes for any work item in GitLab.
MVP: a poll that can be voted on by users and results are visible.
This MVP would be with an aim to fulfill this specific usecase eventually:
- A "closable" poll with a fixed set of voting options, where participants vote in secret, but all votes are displayed once closed.
This is similar to this issue: #16387
And specifically this comment: #16387 (comment 1429160728)
Unlike the issue mentioned above initially this can be very minimal free text voting but created bespoke for polls.
Initial idea
- Two tables introduced to manage the state of polls:
polls
=====
id (PK)
note_id (FK)
title/description (optional?)
votes
=====
id (PK)
poll_id (FK)
vote (as text?)
user_id (FK)
created_at
- Feature flag and quick action introduced for
/start_poll
or/poll
A note on an issue/mr might look like this:
Hi @team, which route do you think would be best? How long will this take?
/start_poll
Displays a note like this:
Hi @team, which route do you think would be best? How long will this take?
POLL- No votes???
- Introduce a /vote quick action
/vote large
Hi @team, which route do you think would be best? How long will this take?
<!-- POLL:12345 -->
* 1x large
Future iterations
- Poll results shown as an image, populated from database:
Hi @team, which route do you think would be best? How long will this take?
<!-- POLL:12345 -->
![poll:12345](https://gitlab.com/project/full/path/poll/12345.png)
- a separate "secret poll" quick action introduced which doesn't display users votes
- add a quick action which closes a poll and prevents future votes,
- once closed a secret poll displays users votes
A closed poll would then look like this:
Hi @team, which route do you think would be best? How long will this take?
<!-- POLL:12345 -->
CLOSED
* 1x large - Tom
* 2x medium - Teresa, Phillipe
* 3x small - Paul, Rodri, Temi
* 0x discuss