Closed
Bug 1321910
Opened 8 years ago
Closed 8 years ago
Error: $scope.currentRepo is undefined in $scope.backfillButtonTitle
Categories
(Tree Management :: Treeherder, defect, P1)
Tree Management
Treeherder
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: emorley, Assigned: jfrench)
References
Details
Attachments
(1 file)
On initial pageload of https://treeherder.mozilla.org/#/jobs?repo=mozilla-inbound the console gets spammed with lots of:
Error: $scope.currentRepo is undefined
$scope.backfillButtonTitle@https://treeherder.mozilla.org/js/index.min.d9fa7158a9bd2aa7.js:29:14595
<SNIP>
Regression from bug 1207460?
Assignee | ||
Comment 1•8 years ago
|
||
Yes, I think it would have to be, that commit added that scope variable. I'm having a look.
Assignee | ||
Comment 2•8 years ago
|
||
I think backfillButtonTitle() is asking for $scope.currentRepo before it exists during page load.
I related function we always had, canBackFill(), appears to experience similar behavior when I put a print in it. It's undefined for a short while during page load (you see a bunch of undefined fly by the console) then it exists and the currentRepo object(s) print out fine. However canBackFill() is used as part of a t/f test for classes and the disabled state, not a title string.
I had just borrowed that same currentRepo test for backfillButtonTitle() assuming it was always 'there'.
Noting here also, I don't think my ng-attr-title was necessary either, I think it could just be title.
Still having a look.
Assignee | ||
Comment 3•8 years ago
|
||
(In reply to Jonathan French (:jfrench) from comment #2)
> I related function we always had
s/I related/A related/
Comment 4•8 years ago
|
||
Assignee | ||
Comment 5•8 years ago
|
||
Well, I have a fix up. Whether it's the correct and best way, is a separate question. :) If you need to tweak it further and merge it asap, feel free. Otherwise I'll keep an eye for review comments.
Assignee: nobody → tojonmz
Status: NEW → ASSIGNED
Assignee | ||
Comment 6•8 years ago
|
||
Comment on attachment 8816636 [details] [review]
[treeherder] tojon:fix-backfill-btntitle > mozilla:master
Ed, if you wish to re-assign the review flag to :camd or :wlach feel free. :) I'm unsure who is around prior to work week travel.
Attachment #8816636 -
Flags: review?(emorley)
Reporter | ||
Updated•8 years ago
|
Attachment #8816636 -
Flags: review?(emorley) → review?(wlachance)
Comment 7•8 years ago
|
||
Comment on attachment 8816636 [details] [review]
[treeherder] tojon:fix-backfill-btntitle > mozilla:master
Hey Jon! Thanks for this. I have a few requests for changes before landing.
Attachment #8816636 -
Flags: review?(wlachance) → review-
Assignee | ||
Comment 8•8 years ago
|
||
Comment on attachment 8816636 [details] [review]
[treeherder] tojon:fix-backfill-btntitle > mozilla:master
Yup, that change works fine. I've re-pushed.
Attachment #8816636 -
Flags: review- → review?(wlachance)
Updated•8 years ago
|
Attachment #8816636 -
Flags: review?(wlachance) → review+
Comment 9•8 years ago
|
||
Commit pushed to master at https://github.com/mozilla/treeherder
https://github.com/mozilla/treeherder/commit/ae3b1052a95a1c431d52b1025bb75ae5bf2c28cd
Bug 1321910 - Fix backfill title console error on page load (#2018)
Comment 10•8 years ago
|
||
I think we can resolve this now.
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•