Page MenuHomePhabricator

Do not display response statistics tab when all participants unregistered
Closed, ResolvedPublic1 Estimated Story PointsBUG REPORT

Description

Description of problem:

Steps to replicate the issue (include links if applicable):

Create an event with participant questions
Register ten users for the event
Change the event end date to a date in the past
Aggregate the event
As the organizer, delete all of the participants
View the response statistics tab

What happens?:
on local, an Internal error
[427c49762d1190746d508d93] /wiki/Special:EventDetails/329 DivisionByZeroError: Division by zero

on prod it is a more graceful failure, but still inaccurate:
Between Non-Number% and −∞% or Between 0 and −9

What should have happened instead?:

I'm not sure how it should be handled. Should the participants response tab still be displayed even if there are no participants?

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):
1.44.0-alpha (5be2826)
17:26, 25 February 2025

Other information (browser name/version, screenshots, etc.):

localms.wiktionary.org
Screenshot 2025-02-25 at 2.45.03 PM.png (1×1 px, 466 KB)
Screenshot 2025-02-25 at 2.46.03 PM.png (1×1 px, 177 KB)
Acceptance Criteria:
  • Do not display response statistics tab when all participants unregistered

Event Timeline

vaughnwalters updated the task description. (Show Details)
vaughnwalters updated the task description. (Show Details)

on prod it is a more graceful failure

Just as long as we're on PHP 7.4 (T319432). Division by zero became an actual error in PHP 8.0.

Should the participants response tab still be displayed even if there are no participants?

Most likely not. Note that we would still be subject to T349650, and that gets worse the fewer participants remain.

ifried renamed this task from Response statistics numbers are inaccurate if all participants deleted to Do not display response statistics tab when all participants unregistered.May 7 2025, 8:17 PM
ifried updated the task description. (Show Details)
ifried updated the task description. (Show Details)

Change #1153325 had a related patch set uploaded (by Daimona Eaytoy; author: Daimona Eaytoy):

[mediawiki/extensions/CampaignEvents@master] SpecialEventDetails: hide stats tab if there are no participants

https://gerrit.wikimedia.org/r/1153325

Daimona set the point value for this task to 1.

Change #1153325 merged by jenkins-bot:

[mediawiki/extensions/CampaignEvents@master] SpecialEventDetails: hide stats tab if there are no participants

https://gerrit.wikimedia.org/r/1153325

When all users are removed from the event by the organizer, then the response statistics tab is no longer shown in betacluster. This is working as expected, but will keep in QA to test in prod before marking as done.

Screen Recording 2025-06-10 at 3.52.25 PM.gif (1×1 px, 3 MB)

Looks good in prod too, marking as done / resolved.