Page MenuHomePhabricator

Year filtering on Special:FundraiserStatistics broken
Closed, ResolvedPublic

Description

Steps to reproduce:

  1. Go to https://wikimediafoundation.org/wiki/Special:FundraiserStatistics
  2. Click customize
  3. Uncheck 2007-2009. Only 2010 and 2011 are visible, as expected
  4. Switch to "Number of contributions" (or any other tab, really)
  5. All years are shown. This is unexpected
  6. Check 2007-2009. This makes them *disappear*. Now all boxes are checked but only 2010 and 2011 are shown

Seems like the JS handling the checkboxes is seriously flawed re its handling of the multiple tabs.


Version: unspecified
Severity: normal

Details

Reference
bz32441

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 12:06 AM
bzimport set Reference to bz32441.
bzimport added a subscriber: Unknown Object (MLST).

scouterjoe5 wrote:

Patch for FundraiserStatistics JavaScript

The problem seems to be with jQuery. When you uncheck 2009 in step 3, the script uses jQuery.toggle(), but toggle() isn't toggling the bars for 2009 on every tab, only the current one. I'm guessing that's because the bars in other tabs are already hidden because their parent <div> is hidden so toggle() ignores them. Whether that's a bug or the folks at jQuery call it a "feature" I don't know. The attached patch for extensions/ContributionReporting sets all bars for a given year to display:block or display:none based on the checkbox state. Tried it on my computer, worked fine.

Attached:

Thanks for the patch! Fixed in r107646.

pgehres wrote:

*** Bug 33505 has been marked as a duplicate of this bug. ***