Use product/component in subject of secure bugs rather than duplicating the bug number

RESOLVED FIXED

Status

()

bugzilla.mozilla.org
Extensions: SecureMail
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: emorley, Assigned: emorley)

Tracking

Production

Details

Attachments

(1 attachment)

(Assignee)

Description

4 years ago
Current secure bugmail has a subject of something like:
> [Bug 853396] (Secure bug 853396 updated)

Repeating the bug number doesn't seem ideal, and given that metadata such as product and component is already available in the message headers (and as such, we wouldn't be revealing anything more by including it in the summary), I think we should instead use:

> [Bug 853396] (Secure bug in Product::Component updated)
or
> [Bug 853396] (Secure Product::Component bug updated)

Or something along those lines.

Failing that, even "[Bug 853396] (Secure bug updated)" would be less redundant than the current subject.

I'm guessing it would need tweaking at:
https://github.com/mozilla/webtools-bmo-bugzilla/blob/a94a60e0eb2a9d213a7182136a881b77304ec7d1/extensions/SecureMail/Extension.pm#L548
(Assignee)

Comment 1

4 years ago
Created attachment 8442819 [details] [diff] [review]
Change to "Secure bug in $product::$component"

Previously the subject line of secure bugs would be something like:
[Bug 123456] (Secure bug 123456 updated)

With this patch, they are now:
[Bug 123456] (Secure bug in product::component)

Since:
* The product & component are already in plaintext in the message headers.
* No other subjects include the word "updated", and for new bugs we have until now appended "updated" in the summary, even though really they are "created". Happy to add this back in with a conditional on $add_new for updated/created if you would prefer.

Thanks :-)
Assignee: nobody → emorley
Status: NEW → ASSIGNED
Attachment #8442819 - Flags: review?(glob)
Comment on attachment 8442819 [details] [diff] [review]
Change to "Secure bug in $product::$component"

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

r=glob

thanks for the patch ed :)

::: extensions/SecureMail/Extension.pm
@@ +551,5 @@
>          # the format of the subject line in another way.
>          my $new = $add_new ? ' New:' : '';
> +        my $product = $email->header('X-Bugzilla-Product');
> +        my $component = $email->header('X-Bugzilla-Component');
> +        $subject =~ s/($bug_id\])\s+(.*)$/$1$new (Secure bug in $product::$component)/;

"$product::" is a valid variable name in perl, so this is empty.

however it looks better with spaces before/after :: and fixes that issue (the alternative fix is ${product}::).

i'll make this change prior to committing for you.
Attachment #8442819 - Flags: review?(glob) → review+
To ssh://gitolite3@git.mozilla.org/webtools/bmo/bugzilla.git
   ea5e2e6..d7b36fd  master -> master
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
(Assignee)

Comment 4

4 years ago
Great, thank you :-)

And yeah wasn't sure about Perl variables - should have guessed that would be a valid name haha.

(Not that it matters, but don't know if you noticed that your patch import/naming script uses the Bugzilla display name rather than the patch author set in the attachment - for this and bug 649691 the commit username had the [:foo] from the display name)
Repeating the bug number is necessary for proper threading in gmail.  You've reintroduced bug 737883.  Please back this out.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
(In reply to Kyle Huey [:khuey] (khuey@mozilla.com) from comment #5)
> Repeating the bug number is necessary for proper threading in gmail.  You've
> reintroduced bug 737883.  Please back this out.

or just add the bug id...
(In reply to Kyle Huey [:khuey] (khuey@mozilla.com) from comment #5)
> Repeating the bug number is necessary for proper threading in gmail.  You've
> reintroduced bug 737883.  Please back this out.

bug 1030747
Status: REOPENED → RESOLVED
Last Resolved: 4 years ago4 years ago
Resolution: --- → FIXED
(Assignee)

Comment 8

4 years ago
Thank you Byron :-)

(And ffs gmail...)
(Assignee)

Updated

4 years ago
Depends on: 1030747
You need to log in before you can comment on or make changes to this bug.