← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~jcsackett/launchpad/missing-results-count-in-chromium into lp:launchpad

 

j.c.sackett has proposed merging lp:~jcsackett/launchpad/missing-results-count-in-chromium into lp:launchpad with lp:~jcsackett/launchpad/clean-up-buglisting-classes as a prerequisite.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~jcsackett/launchpad/missing-results-count-in-chromium/+merge/124057

Summary
=======
Per bug 984871, the bug listing javascript removed the display of the total
number of results when showing navigation links (i.e. NNNN -> MMMM of $total
results).

This was because while it was passing a total from the BugListingModel into
the template, the total was never explicitly set within the model once passed
in via config, and an undefined result was passed to mustache. I have no idea
how it is that firefox continued to display the results count.

Implementation
==============
Add "total" to the ListingModel's ATTRs. It's already passed in via config, so
the YUI Base initializer magic takes care of everything.

Tests
=====
bin/test -vvct buglisting --layer=YUI

QA
==
Ensure the proper results count is displayed on a buglisting in
chrome/chromium.

LoC
===
This branch is preceeded by one that is -20 LoC, to make space for this fix.

Lint
====

Checking for conflicts and issues in changed files.

Linting changed files:
  lib/lp/bugs/javascript/buglisting.js
-- 
https://code.launchpad.net/~jcsackett/launchpad/missing-results-count-in-chromium/+merge/124057
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~jcsackett/launchpad/missing-results-count-in-chromium into lp:launchpad.
=== modified file 'lib/lp/bugs/javascript/buglisting.js'
--- lib/lp/bugs/javascript/buglisting.js	2012-09-12 20:45:45 +0000
+++ lib/lp/bugs/javascript/buglisting.js	2012-09-12 20:45:45 +0000
@@ -88,7 +88,8 @@
         }
     }, {
         ATTRS: {
-            field_visibility_defaults: { value: null }
+            field_visibility_defaults: { value: null },
+            total: { value: null }
         }    
     });
 


Follow ups