Wrong percentage step size

Created on 7 February 2024, 5 months ago
Updated 22 February 2024, 4 months 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 d4t3r

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

Comments & Activities

  • Issue created by @d4t3r
  • Status changed to Fixed 5 months ago
  • πŸ‡ΊπŸ‡ΈUnited States TR Cascadia

    No, looks right to me. 20 is 1 star, 40 is 2 star, 60 is 3 star, 80 is 4 star, 100 is 5 star (for default 5 star configuration).

    0 mean not voted yet.

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.69.0 2024