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)

defect

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?
Yes, I think it would have to be, that commit added that scope variable. I'm having a look.
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.
(In reply to Jonathan French (:jfrench) from comment #2) > I related function we always had s/I related/A related/
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
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)
Attachment #8816636 - Flags: review?(emorley) → review?(wlachance)
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-
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)
Attachment #8816636 - Flags: review?(wlachance) → review+
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.

Attachment

General

Created:
Updated:
Size: