Closed Bug 1093450 Opened 10 years ago Closed 10 years ago

Sort by vote isn't sorting correctly

Categories

(bugzilla.mozilla.org Graveyard :: Extensions: ProductDashboard, defect)

Production
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: lizzard, Assigned: glob)

Details

The product dashboard for popularity by product isn't sorting correctly. So, for example, if you look at the most voted on bugs for Toolkit,
https://bugzilla.mozilla.org/page.cgi?id=productdashboard.html&tab=popularity&product=Toolkit&bug_status=open

And sort by number of votes, you get 90, then 9, then 86, then 8. 

I'd like to be able to see the list sorted by most popular bug.
WFM on first page load (since it defaults to sorted by votes), but doesn't work once the column headers are clicked. 

Seems like the datatable needs to be told to use numeric sort:
https://github.com/mozilla/webtools-bmo-bugzilla/blob/master/extensions/ProductDashboard/web/js/popularity.js

-  { key:"count", label:"Count", sortable:true },
+  { key:"count", label:"Count", sortable:true, parser: 'number' },

Or else we set the values to be ints not a string, by removing the quotes here: 
https://github.com/mozilla/webtools-bmo-bugzilla/blob/master/extensions/ProductDashboard/template/en/default/pages/productdashboard/popularity.html.tmpl#L18
fixes count on popularity and duplicates, and also treats bug ids as integers:

To ssh://gitolite3@git.mozilla.org/webtools/bmo/bugzilla.git
   7dc675f..3a4ca4b  master -> master
Assignee: nobody → glob
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Product: bugzilla.mozilla.org → bugzilla.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.