View Issue Details

IDProjectCategoryView StatusLast Update
0019045phpList 3 applicationInterface - Administratorpublic28-03-18 11:21
Reportersamtuke 
PriorityurgentSeverityminorReproducibilityhave not tried
Status resolvedResolutionfixed 
PlatformLinuxOSFedoraOS Version26
Product Version3.3.1 
Target Version3.3.2Fixed in Version3.3.2 
Summary0019045: Fix miscalculation of percentages on Campaign statistics page
DescriptionCurrently the Statistics overview page (e.g. /lists/admin/?page=statsoverview&id=2) has incorrect percentage statistics such as:

Opened -1550.27 %
Clicked -2884.73 %
Click Ratio 186.08 %

Fix the erroneous calculation to give the literal statistics, as well as the percentages. E.g.:

Opened 10 (10%)
Clicked 5 (5%)
Click Ratio 50%
Tagsquick-fix

Relationships

has duplicate 0018976 closedsamtuke Campaign click statistics page shows negative percentages for clicks 

Activities

samtuke

16-01-18 19:12

administrator   ~0059846

The dummy database contains sufficient data to illustrate this issue, and is used in the attached screenshot (https://resources.phplist.com/develop/infrastructure#code). Tested with real data from a production installation server also.

Selection_381.png (94,766 bytes)
Selection_381.png (94,766 bytes)

duncanc

21-01-18 10:28

developer   ~0059866

Probably caused by an error in an earlier pull request https://github.com/phpList/phplist3/pull/149/files

number_format() should not be applied to $totalSent

Also, there are two rows which are erroneously not displayed - the opened total and the clicked total. See my comment https://github.com/phpList/phplist3/pull/236#issuecomment-355768164

samtuke

22-01-18 12:40

administrator   ~0059880

@duncanc Good call -- @xheni Duncan's comments should help with resolving this issue, and the related one he describes.

xheni

22-01-18 15:20

administrator   ~0059884

@duncanc thanks for your comments.
PR : https://github.com/phpList/phplist3/pull/244