← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~rharding/launchpad/sort_labels_894744 into lp:launchpad

 

Richard Harding has proposed merging lp:~rharding/launchpad/sort_labels_894744 into lp:launchpad.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)
Related bugs:
  Bug #894744 in Launchpad itself: "Inconsistent labelling on bug sort buttons"
  https://bugs.launchpad.net/launchpad/+bug/894744

For more details, see:
https://code.launchpad.net/~rharding/launchpad/sort_labels_894744/+merge/86287

= Summary =
The column labels in the new buglisting is very context specific. We clean up the titles by removing unnecessary repetition of "Bug" in the titles.

== Implementation Details ===
Find the instances and replace them.
Bug number -> Number
Bug title -> Title
Bug heat -> Heat
Bug tags -> Tags
Bug age -> Age
Date bug closed -> Date closed
Date bug last updated -> Date last updated


== Screenshots ==
http://uploads.mitechie.com/lp/bug_sort_order.png
http://uploads.mitechie.com/lp/bug_popup.png

== Q/A ==
Check out the bug listing pages and the order by 'lozenge' should be clear, but not include extra "Bug" references. They are also replaced on the overlay widget where you choose the data to view so that the sort 'lozenge' and the description of the data in the overlay widget.

== Tests ==
google-chrome lib/lp/bugs/javascript/tests/test_buglisting_utils.html
google-chrome lib/lp/app/javascript/ordering/tests/test_orderby_widget.html

also ran the entire bugtask set since we changed the browser/bugtask.py file.

bin/test -cvt "bugtask"
-- 
https://code.launchpad.net/~rharding/launchpad/sort_labels_894744/+merge/86287
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~rharding/launchpad/sort_labels_894744 into lp:launchpad.
=== modified file 'lib/lp/app/javascript/ordering/ordering.js'
--- lib/lp/app/javascript/ordering/ordering.js	2011-12-16 03:40:04 +0000
+++ lib/lp/app/javascript/ordering/ordering.js	2011-12-19 20:02:27 +0000
@@ -38,15 +38,15 @@
          */
         sort_keys: {
             value: [
-                ['bugnumber', 'Bug number'],
-                ['bugtitle', 'Bug title'],
+                ['bugnumber', 'Number'],
+                ['bugtitle', 'Title'],
                 ['status', 'Status'],
                 ['importance', 'Importance'],
-                ['bug-heat-icons', 'Bug heat'],
+                ['bug-heat-icons', 'Heat'],
                 ['package', 'Package name'],
                 ['milestone', 'Milestone'],
                 ['assignee', 'Assignee'],
-                ['bug-age', 'Bug age']
+                ['bug-age', 'Age']
             ]
         },
 

=== modified file 'lib/lp/app/javascript/ordering/tests/test_orderby_widget.js'
--- lib/lp/app/javascript/ordering/tests/test_orderby_widget.js	2011-12-08 13:23:00 +0000
+++ lib/lp/app/javascript/ordering/tests/test_orderby_widget.js	2011-12-19 20:02:27 +0000
@@ -64,15 +64,15 @@
         // The default sort keys should exist in a newly created widget.
         this.orderby = new Y.lp.ordering.OrderByBar();
         var expected_sort_keys = [
-            ['bugnumber', 'Bug number'],
-            ['bugtitle', 'Bug title'],
+            ['bugnumber', 'Number'],
+            ['bugtitle', 'Title'],
             ['status', 'Status'],
             ['importance', 'Importance'],
-            ['bug-heat-icons', 'Bug heat'],
+            ['bug-heat-icons', 'Heat'],
             ['package', 'Package name'],
             ['milestone', 'Milestone'],
             ['assignee', 'Assignee'],
-            ['bug-age', 'Bug age']
+            ['bug-age', 'Age']
         ];
         var expected = this.getIdsAndNames(expected_sort_keys);
         var actual = this.getIdsAndNames(this.orderby.get('sort_keys'));

=== modified file 'lib/lp/bugs/browser/bugtask.py'
--- lib/lp/bugs/browser/bugtask.py	2011-12-18 03:35:49 +0000
+++ lib/lp/bugs/browser/bugtask.py	2011-12-19 20:02:27 +0000
@@ -2496,17 +2496,17 @@
 SORT_KEYS = [
     ('importance', 'Importance'),
     ('status', 'Status'),
-    ('id', 'Bug number'),
-    ('title', 'Bug title'),
+    ('id', 'Number'),
+    ('title', 'Title'),
     ('targetname', 'Package/Project/Series name'),
     ('milestone_name', 'Milestone'),
-    ('date_last_updated', 'Date bug last updated'),
+    ('date_last_updated', 'Date last updated'),
     ('assignee', 'Assignee'),
     ('reporter', 'Reporter'),
-    ('datecreated', 'Bug age'),
-    ('tag', 'Bug Tags'),
-    ('heat', 'Bug heat'),
-    ('date_closed', 'Date bug closed'),
+    ('datecreated', 'Age'),
+    ('tag', 'Tags'),
+    ('heat', 'Heat'),
+    ('date_closed', 'Date closed'),
     ('dateassigned', 'Date when the bug task was assigned'),
     ('number_of_duplicates', 'Number of duplicates'),
     ('latest_patch_uploaded', 'Date latest patch uploaded'),

=== modified file 'lib/lp/bugs/javascript/buglisting_utils.js'
--- lib/lp/bugs/javascript/buglisting_utils.js	2011-12-15 15:11:50 +0000
+++ lib/lp/bugs/javascript/buglisting_utils.js	2011-12-19 20:02:27 +0000
@@ -49,17 +49,17 @@
      * form inputs.
      */
     BugListingConfigUtil.field_display_names = {
-        show_id: 'Bug number',
+        show_id: 'Number',
         show_importance: 'Importance',
         show_status: 'Status',
-        show_heat: 'Bug heat',
+        show_heat: 'Heat',
         show_targetname: 'Package/Project/Series name',
-        show_datecreated: 'Bug age',
-        show_date_last_updated: 'Date bug last updated',
+        show_datecreated: 'Age',
+        show_date_last_updated: 'Date last updated',
         show_assignee: 'Assignee',
         show_reporter: 'Reporter',
         show_milestone_name: 'Milestone',
-        show_tag: 'Bug tags'
+        show_tag: 'Tags'
     };
 
     BugListingConfigUtil.ATTRS = {

=== modified file 'lib/lp/bugs/javascript/tests/test_buglisting_utils.js'
--- lib/lp/bugs/javascript/tests/test_buglisting_utils.js	2011-12-15 15:11:50 +0000
+++ lib/lp/bugs/javascript/tests/test_buglisting_utils.js	2011-12-19 20:02:27 +0000
@@ -454,19 +454,19 @@
     },
 
     SORT_KEYS: [
-        ['id', 'Bug number'],
-        ['title', 'Bug title'],
+        ['id', 'Number'],
+        ['title', 'Title'],
         ['importance', 'Importance'],
         ['status', 'Status'],
-        ['heat', 'Bug heat'],
+        ['heat', 'Heat'],
         ['reporter', 'Reporter'],
         ['assignee', 'Assignee'],
         ['targetname', 'Package/Project/Series name'],
         ['milestone_name', 'Milestone'],
-        ['datecreated', 'Bug age'],
-        ['date_last_updated', 'Date bug last updated'],
-        ['tag', 'Bug Tags'],
-        ['date_closed', 'Date bug closed'],
+        ['datecreated', 'Age'],
+        ['date_last_updated', 'Date last updated'],
+        ['tag', 'Tags'],
+        ['date_closed', 'Date closed'],
         ['dateassigned', 'Date when the bug task was assigned'],
         ['number_of_duplicates', 'Number of duplicates'],
         ['latest_patch_uploaded', 'Date latest patch uploaded'],