Wrong percentage step size

Created on 7 February 2024, about 1 year ago
Updated 22 February 2024, about 1 year ago

Problem/Motivation

In my world the value of 3 stars is equivalent to 50%. If I click on the votes tab, I can see a vote value of 60.
In my world the value of 1 star is equivalent to 0%. If I click on the votes tab, I can see a vote value of 20.
Is this maybe right for others? Or needed for something else?

More details:
My step size would be 25% (if you have the default of 5 stars configured) - here it is 20.
0% -> 1 star
25% -> 2 stars
...
100% 5 stars

Maybe this formula helps. Got it from someone else, so be careful.
$percentage_value = ($count_stars - 1) * 25

Steps to reproduce

Have a percentage vote type and choose it for fivestar field.
Stay at the defaults of fivestar field configuration.
Vote one star and click on the votes tab of the node. It shows 20.
Then change the formatter to percent, it will show 20%.

πŸ’¬ Support request
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡©πŸ‡ͺGermany drupalbubb

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

Comments & Activities

Production build 0.71.5 2024