Details
-
Bug
-
Resolution: Fixed
-
Low
-
4.7.0-dev
-
None
-
PHP Version: 5.3.3
Database and version: psql (PostgreSQL) 8.4.9; MySQL 5.1.52
Description
Under certain conditions, on an object with eZ Star Rating enabled, the average calculated score will not be rounded or properly formatted, e.g:
An article receives 3 different votes: 1 star, 5 stars, 4 stars
The average calculated score is shown as: 3.33333333333333/5
Steps to reproduce
1. Create three user accounts
2. Create an article with eZ Star Rating enabled
3. As user 1, rate the article 1 star, the score will be 1
4. As user 2, rate the article 5 stars, the score will be 3
5. As user 4, rate the article 4 stars, the score will be 3.33333333333333