Add link to orange factor from bugs in tbpl comments for starred oranges

RESOLVED FIXED

Status

Tree Management Graveyard
TBPL
RESOLVED FIXED
7 years ago
3 years ago

People

(Reporter: jgriffin, Assigned: jgriffin)

Tracking

Details

Attachments

(1 attachment)

(Assignee)

Description

7 years ago
For bug numbers appearing in comments for starred oranges, we'd like to add a link to the corresponding bug info in the OrangeFactor website, e.g., http://brasstacks.mozilla.com/orangefactor/?display=Bug&bugid=626956&startday=2011-01-06&endday=2011-02-03.
(Assignee)

Comment 1

7 years ago
Created attachment 509582 [details] [diff] [review]
patch
Attachment #509582 - Flags: review?
(Assignee)

Updated

7 years ago
Attachment #509582 - Flags: review? → review?(mstange)
Comment on attachment 509582 [details] [diff] [review]
patch

>+    function ISODateString(d) {
>+     function pad(n){return n<10 ? '0'+n : n};
>+     return d.getUTCFullYear()+'-'
>+          + pad(d.getUTCMonth()+1)+'-'
>+          + pad(d.getUTCDate());
>+    };

Just a flyby comment: Please add more spaces around operators, also a semicolon after the return statement.
Comment on attachment 509582 [details] [diff] [review]
patch

Looks good, just some style nits:

>diff --git a/js/UserInterface.js b/js/UserInterface.js

>+  _linkBugs: function UserInterface__linkBugs(text, add_orangefactor_link) {

Call the parameter addOrangefactorLink.

>+    function ISODateString(d) {
>+     function pad(n){return n<10 ? '0'+n : n};
>+     return d.getUTCFullYear()+'-'
>+          + pad(d.getUTCMonth()+1)+'-'
>+          + pad(d.getUTCDate());
>+    };

Make this UserInterface._ISODateString and use UserInterface._pad instead of defining another pad function. Also please address Arpad's request about spaces around operators.

>+      var earlier = new Date(today.getTime() - (1000 * 60 * 60 * 24 * 60));

Maybe call this sixtyDaysAgo so that I don't have to parse the calculation every time I read this :)

>+      buglink += ' [<a class="testfailed" href="http://brasstacks.mozilla.com/orangefactor/?display=Bug&endday=' +

I'd prefer it if the link looked like a link, so please don't use class="testfailed" here.
Attachment #509582 - Flags: review?(mstange) → review+
(Assignee)

Comment 4

7 years ago
All review comments addressed; pushed as http://hg.mozilla.org/users/mstange_themasta.com/tinderboxpushlog/rev/df52b5c4e543
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
Depends on: 631727
Product: Webtools → Tree Management
Product: Tree Management → Tree Management Graveyard
You need to log in before you can comment on or make changes to this bug.