Closed Bug 1029800 Opened 10 years ago Closed 9 years ago

Release Tracking Report doesn't return bugs with tracking flags set to --- when searching for "not fixed" values

Categories

(bugzilla.mozilla.org :: Extensions, defect)

Production
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: dkl, Assigned: glob)

References

()

Details

Attachments

(1 file)

Ryan pinged me in IRC about the Release Tracking Report not picking up a bug that is should be showing so I took a look at the SQL being generated.

<RyanVM|sheriffduty> I'm trying to figure out why bug 1024778 isn't coming up in the results when I choose "approval-mozilla-aurora", "+", "2014-05-27 and 2014-07-07" and check the "cf_status_firefox32:not fixed" option below it

So I selected the same and bug 1024778 did not show up in the list even though it seemed like it should.

The SQL generated to create the list of bug ids:

SELECT DISTINCT b.bug_id
FROM bugs b
     INNER JOIN flags f ON f.bug_id = b.bug_id 
     INNER JOIN bugs_activity a ON a.bug_id = b.bug_id
     LEFT JOIN tracking_flags_bugs AS tfb ON tfb.bug_id = b.bug_id
     LEFT JOIN tracking_flags AS tf ON tfb.tracking_flag_id = tf.id
WHERE (a.fieldid = 69)
      AND (a.bug_when >= '2014-05-27 00:00:00')
      AND (a.bug_when < '2014-07-01 00:00:00')
      AND (a.added LIKE '%approval-mozilla-aurora+%')
      AND (f.type_id = 720)
      AND (f.status = '+')
      AND (tf.name = 'cf_status_firefox32'
           AND COALESCE(tfb.value,'') NOT IN ('fixed', 'verified'))

bug_id
995407
998785
1010986

1024778 is absent. But looking at the bug itself it had all the proper attributes to match (although now it has status-firefox32:fixed set)

Any thoughts on what I am missing?

dkl
Flags: needinfo?(glob)
that query returns bugs where status-firefox32 is set to a value which is not 'fixed' or 'verified'.

before ryan set status-firefox32 to fixed on [2014-06-24 13:35:04 PDT], that field was not set to any value, so it was not returned by the report.

ryan - my understanding is the bug should have had status-firefox32 set to 'affected' for it to show up on your radar.  is this correct?

if not, we'll have to update the report to make "not set" values returned when searching for "not fixed".
Flags: needinfo?(glob) → needinfo?(ryanvm)
Summary: Strange DB inconsistency in the Release Tracking Report when joining with tracking flags → Release Tracking Report doesn't return bugs with tracking flags set to --- when searching for "not fixed" values
(In reply to Byron Jones ‹:glob› from comment #1)
> if not, we'll have to update the report to make "not set" values returned
> when searching for "not fixed".

That's the behavior I'd expect, yes.
Flags: needinfo?(ryanvm)
Assignee: nobody → glob
Attached patch 1029800_1.patchSplinter Review
- treat unset tracking flags as 'not fixed'
- line-for-line port from yui to jquery
- show field description (status-firefox40) instead of field name (cf_status_firefox40)
Attachment #8670838 - Flags: review?(dkl)
Comment on attachment 8670838 [details] [diff] [review]
1029800_1.patch

Review of attachment 8670838 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good. I did notice some errors in the console when clicking [All|None][Invert]

TypeError: cb is null
TypeError: cb is null
TypeError: el is null

I was able to fix the errors locally with:

@@ -82,8 +82,11 @@ function onFlagChange() {
 // form

 function selectAllFields() {
-  for(var i = 0, l = fields_data.length; i < l; i++) {
-    var cb = Dom.get('field_' + fields_data[i].id + '_cb');
+  var productData = productEl.value == '0'
+                    ? getFlagByName(flagEl.value)
+                    : getProductById(productEl.value);
+  for(var i = 0, l = productData.fields.length; i < l; i++) {
+    var cb = $('#field_' + productData.fields[i] + '_cb')[0];
     cb.checked = true;
     onFieldToggle(cb, fields_data[i].id);
   }
@@ -91,8 +94,11 @@ function selectAllFields() {
 }

 function selectNoFields() {
-  for(var i = 0, l = fields_data.length; i < l; i++) {
-    var cb = Dom.get('field_' + fields_data[i].id + '_cb');
+  var productData = productEl.value == '0'
+                    ? getFlagByName(flagEl.value)
+                    : getProductById(productEl.value);
+  for(var i = 0, l = productData.fields.length; i < l; i++) {
+    var cb = $('#field_' + productData.fields[i] + '_cb')[0];
     cb.checked = false;
     onFieldToggle(cb, fields_data[i].id);
   }
@@ -100,12 +106,17 @@ function selectNoFields() {
 }

 function invertFields() {
-  for(var i = 0, l = fields_data.length; i < l; i++) {
-    var el = Dom.get('field_' + fields_data[i].id + '_select');
-    if (el.value == '+') {
-      el.options[1].selected = true;
-    } else {
-      el.options[0].selected = true;
+  var productData = productEl.value == '0'
+                    ? getFlagByName(flagEl.value)
+                    : getProductById(productEl.value);
+  for(var i = 0, l = productData.fields.length; i < l; i++) {
+    var el = $('#field_' + productData.fields[i] + '_select')[0];
+    if (el) {
+      if (el.value == '+') {
+        el.options[1].selected = true;
+      } else {
+        el.options[0].selected = true;
+      }
     }
   }
   serialiseForm();

We can address those separately or fix on commit. r=dkl
Attachment #8670838 - Flags: review?(dkl) → review+
(In reply to David Lawrence [:dkl] from comment #5)
> Looks good. I did notice some errors in the console when clicking
> [All|None][Invert]
> 
> TypeError: cb is null
> TypeError: cb is null
> TypeError: el is null

none of these errors are new, but i'll fix them here.

> I was able to fix the errors locally with:

thanks -- although developing fixes for issues you find during review is unnecessary; feel free to just say you found a problem and let the dev fix it.
went with a much easier fix than the one you suggested (just skip elements that weren't found).

To ssh://gitolite3@git.mozilla.org/webtools/bmo/bugzilla.git
   d055408..c0de3b6  master -> master
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Component: Extensions: BMO → Extensions
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: