Enable Views integration for poll votes

Created on 2 November 2020, over 3 years ago
Updated 24 March 2024, 3 months ago

Problem/Motivation

Although this module has some Views integration out-of-the-box, it prevents users from creating Views of poll votes (results). Users may want to display Poll votes in views for various reasons, such as aggregation or charting.

Steps to reproduce

1) Navigate to /admin/structure/views/add and select "Poll" in the "Show" select list. Apply any other configuration you desire and then click the "Save and edit" button.
2) Click "Add" in the fields section and look for poll votes (you will not find them).

Proposed resolution

1) Use HOOK_views_data() to make the desired columns in the poll_vote table available to Views.
2) This also requires modifying PollViewData.php and PollChoiceViewData.php.

Remaining tasks

Review the attached patch.

✨ Feature request
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States andileco

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

Merge Requests

Comments & Activities

Not all content is available!

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

Production build 0.69.0 2024