Buildduty Report sorting should not error out (JS) if a section has no bugs

RESOLVED FIXED

Status

Release Engineering
General
P2
normal
RESOLVED FIXED
3 years ago
21 days ago

People

(Reporter: Callek, Assigned: coop)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

3 years ago
Created attachment 8391484 [details] [diff] [review]
[braindump] fix sorting

So buildduty_report.html when it has no open bugs with no deps, will fail to instantiate sorting due to tbodies[0] being undefined and throw a JS error that stops us from setting up for other instances.

This patch fixes that
Attachment #8391484 - Flags: review?(armenzg)
(Reporter)

Comment 1

3 years ago
Created attachment 8391544 [details] [diff] [review]
[braindump] fix sorting (correct patch)
Attachment #8391484 - Attachment is obsolete: true
Attachment #8391484 - Flags: review?(armenzg)
Attachment #8391544 - Flags: review?(armenzg)
Attachment #8391544 - Flags: review?(armenzg) → review+
(Reporter)

Comment 2

3 years ago
Comment on attachment 8391544 [details] [diff] [review]
[braindump] fix sorting (correct patch)

So this had to be backed out,

First I didn't do ()'s around the if statement, secondly my JQuery syntax was utterly broken. I'm going to need a real review from someone else later, possibly taking a webops human for said review.
Attachment #8391544 - Flags: checked-in-
(Assignee)

Updated

3 years ago
Assignee: bugspam.Callek → coop
Status: NEW → ASSIGNED
Priority: -- → P2
(Assignee)

Comment 3

3 years ago
The default date format returned by the bugzilla REST API was confusing JS/jquery such that we could only ever sort in one direction. Stripping out the letters fixed this:

https://hg.mozilla.org/build/slave_health/rev/14cf6897fb8c
https://hg.mozilla.org/build/slave_health/rev/66ee83796ece

I also added a placeholder row that explicitly lets us know that no bugs were found, but that didn't actually fix the bug on its own.
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
Component: Tools → General
Product: Release Engineering → Release Engineering
You need to log in before you can comment on or make changes to this bug.