Allow admins to alter number of votes cast for a poll

Created on 26 February 2019, over 5 years ago
Updated 15 April 2024, 2 months ago

We are migrating a few polls from an old site (D7) to a new one (D8), and we need a way to create a poll on the D8 site and set a certain number of votes for each choice to start off with, so it reflects the data from the D7 site's poll. Currently there is no way to manually choose how many votes each choice currently has.

✨ Feature request
Status

Needs work

Version

2.0

Component

User interface

Created by

πŸ‡ΊπŸ‡ΈUnited States TerranRich

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • First commit to issue fork.
  • @phjou opened merge request.
  • πŸ‡¨πŸ‡¦Canada phjou Vancouver/Paris πŸ‡¨πŸ‡¦ πŸ‡ͺπŸ‡Ί

    I rewrote a patch from scratch that is using the PollChoice entity as @Berdir indicated.

    https://git.drupalcode.org/project/poll/-/merge_requests/16.patch

    The merge request basically just add a new property "starting_votes" on the PollChoice entity. And then it was just a matter of changing the functions to calculate the totals to use that additional property when needed.
    There is a hook_update to run in order to get that new property installed in case the module was already enabled.

  • Status changed to Needs review about 1 year ago
  • πŸ‡¨πŸ‡¦Canada phjou Vancouver/Paris πŸ‡¨πŸ‡¦ πŸ‡ͺπŸ‡Ί
  • Status changed to Needs work 2 months ago
  • πŸ‡§πŸ‡ͺBelgium BramDriesen Belgium πŸ‡§πŸ‡ͺ
Production build 0.69.0 2024