Closed Bug 772994 Opened 7 years ago Closed 7 years ago

Add a new header to bug mail called X-Bugzilla-Tracking that shows current tracking flag values

Categories

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

Production
enhancement
Not set

Tracking

()

RESOLVED FIXED

People

(Reporter: dkl, Assigned: dkl)

References

Details

Attachments

(2 files, 2 obsolete files)

I'd personally love to see this. It'd help get priority bugmail into my inbox. Based upon conversations here, I believe that would be helpful for others as well. Let's hear what they think though.

-Alex

On Jul 11, 2012, at 11:46 AM, David Lawrence wrote:

> We could certainly add a custom email header such as:
>
> X-Bugzilla-Tracking: tracking-firefox13:? tracking-firefox12:+
> status-firefox12:affected
>
> where the values are the field names and their respective set value
> concatenated together with a colon. You could then filter on that header
> in your client. Would something like that be useful?
>
> dkl
>
> On 07/11/2012 01:46 PM, Alex Keybl wrote:
>>> First: There are very few signs that individual bugmail, review
>>> requests, etc., are related to a tracking+ bug.  I have enough
>>> trouble reading all my bugmail as it is (i.e., I often don't), and I
>>> certainly don't have time to load each bug (especially given that
>>> that usually takes 10-20 seconds given how slow Bugzilla is) and see
>>> if it's tracking+ while I'm doing it.
>>
>> Including Byron and David here to see if they have any suggestions of how to filter bugs marked with the custom tracking flag in email, or whether we can surface that value better.
Attachment #641181 - Flags: review?(glob)
Works for me.

David Lawrence wrote:
> How about we add it in the header *and* also add similar text to the top
> of the bug mail body? That would fill in the gap for Gmail users and
> similar. Would the extra body text be considered intrusive to those who
> do not care to see that information or need to filter on it?
i think the extra text _would_ be too intrusive.

we should add it to the headers now, and to the html bugmail in bugzilla 4.2 so we can style it to be less intrusive.

-byron
Comment on attachment 641186 [details] [diff] [review]
Patch to add X-Bugzilla-Tracking header to bug mail (4.2-bmo) (v1)

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

::: extensions/BMO/Extension.pm
@@ +822,5 @@
> +
> +    # Bug 772994 - Bug 772994 - Add a new header to bug mail called 
> +    # X-Bugzilla-Tracking that shows current tracking flag values
> +    if ($email->header('X-Bugzilla-Status') ||
> +        $email->header('X-Bugzilla-Type') eq 'request')

you need to check that the x-bugzilla-type header exists to avoid 'use of unitialized value' warnings.

@@ +827,5 @@
> +    {
> +        # This is also a bit of a hack, but there's no header with the
> +        # bug ID in. So we take the first number in the subject.
> +        my ($bug_id) = ($email->header('Subject') =~ /\[\D+(\d+)\]/);
> +        my $bug = new Bugzilla::Bug($bug_id);

i added X-Bugzilla-ID to our custom bugmail header, so you can use that on 4.2.

looking at the code, i didn't add it to the requests headers; you could either add the x-bugzilla-id header to that email on this bug, or leave the subject parsing code in as a fall-back.

@@ +836,5 @@
> +
> +        my $component = Bugzilla::Component->new({ 
> +            name    => $email->header('X-Bugzilla-Component'), 
> +            product => $product
> +        });

neither of these headers exist in 'request' email.
Attachment #641186 - Flags: review?(glob) → review-
Note that we also need to know the status field of the bug for tracked bugs (such as status-firefox14, etc.) for this to be useful in determining what the exact state of the bug is.
Blocks: 773327
So everybody knows, I filed bug 773327 for the in-content version of this bug.
Attachment #641181 - Flags: review?(glob)
Attachment #641181 - Attachment is obsolete: true
Attachment #641562 - Flags: review?(glob)
Revised patch that utilizes X-Bugzilla-ID for both bugmail and flag requests.

dkl
Attachment #641186 - Attachment is obsolete: true
Attachment #641590 - Flags: review?(glob)
(In reply to Ehsan Akhgari [:ehsan] from comment #5)
> Note that we also need to know the status field of the bug for tracked bugs
> (such as status-firefox14, etc.) for this to be useful in determining what
> the exact state of the bug is.

Status flags will be included.
Comment on attachment 641562 [details] [diff] [review]
Patch to add X-Bugzilla-Tracking header to bug mail (4.0-bmo) (v2)

r=glob

on commit please fix:

>+    # Bug 772994 - Bug 772994 - Add a new header to bug mail called 
>+    # X-Bugzilla-Tracking that shows current tracking flag values

this comment doesn't need to reference the bug, and should state what the code does rather the the bug's subject. eg.

# Add X-Bugzilla-Tracking header
Attachment #641562 - Flags: review?(glob) → review+
Comment on attachment 641590 [details] [diff] [review]
Patch to add X-Bugzilla-Tracking header to bug mail (4.2-bmo) (v2)

r=glob

on commit please fix:

>+    # Bug 772994 - Add a new header to bug mail called 
>+    # X-Bugzilla-Tracking that shows current tracking flag values

this comment doesn't need to reference the bug, and should state what the code does rather the the bug's subject. eg.

# Add X-Bugzilla-Tracking header

>+    if ($email->header('X-Bugzilla-ID')) {
>+        my $bug_id = $email->header('X-Bugzilla-ID');
>+
>+        # return if we cannot successfully load the bug object
>+        return if !$bug_id;

you're already doing this check via if ($email->header('X-Bugzilla-ID'))
Attachment #641590 - Flags: review?(glob) → review+
Thanks

Committing to: bzr+ssh://dlawrence%40mozilla.com@bzr.mozilla.org/bmo/4.0
modified extensions/BMO/Extension.pm
Committed revision 8240

Committing to: bzr+ssh://dlawrence%40mozilla.com@bzr.mozilla.org/bmo/4.2  
modified extensions/BMO/Extension.pm
Committed revision 8244
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Component: Extensions: BMO → Extensions
You need to log in before you can comment on or make changes to this bug.