Closed Bug 752400 Opened 12 years ago Closed 12 years ago

Give summary and URL of bugs added or removed from dependencies in bugmail

Categories

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

Production
defect
Not set
normal

Tracking

()

VERIFIED FIXED

People

(Reporter: glob, Assigned: glob)

References

Details

Attachments

(2 files, 2 obsolete files)

bug 97956 is about "Give summary and URL of bugs added or removed from dependencies in bugmail" upstream.

given the uncertainty about how this should be resolved, and the added benefit this would provide to bugmail, we should make a bmo specific hack to show bug summaries for bugs mentioned in dependency changes at the end of bugmail, and get it deployed quickly.

then we can tackle upstream and argue the best way to solve it there.
Attached patch patch v1 (obsolete) — Splinter Review
Attachment #621503 - Flags: review?(dkl)
Attached image sample message
Comment on attachment 621503 [details] [diff] [review]
patch v1

Looks like there is no security check done. Unprivileged users will see the bug summary of bugs restricted to groups they cannot access. You have to call $user->visible_bugs first.
Attachment #621503 - Flags: review?(dkl) → review-
Comment on attachment 621503 [details] [diff] [review]
patch v1

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

As LpSolit mentioned, we need to filter the referenced bug data based on the users permissions to see the bug. Something like this would be sufficient:

@@ -430,6 +439,8 @@
                 }
             }
 
+            @referenced_bugs = @{$user->visible_bugs(\@referenced_bugs)};
+
             # Make sure the user isn't in the nomail list, and the insider and 
             # dep checks passed.
             # Upstreaming: when we port to 4.2, check the login names of the

dkl
Attached patch patch v2 (obsolete) — Splinter Review
thanks for catching that LpSolit!
Attachment #621503 - Attachment is obsolete: true
Attachment #621608 - Flags: review?(dkl)
Comment on attachment 621608 [details] [diff] [review]
patch v2

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

Hmm. Need to either scrub the subject or omit the entry altogether if the referenced bug is private to one or more "secure" groups requiring an encryption key.
Attachment #621608 - Flags: review?(dkl) → review-
(In reply to David Lawrence [:dkl] from comment #6)
> Hmm. Need to either scrub the subject or omit the entry altogether if the
> referenced bug is private to one or more "secure" groups requiring an
> encryption key.

May need a new hook that filters the referenced bug list since SecureMail is an extension.

dkl
Attached patch patch v3Splinter Review
Attachment #621608 - Attachment is obsolete: true
Attachment #621900 - Flags: review?(dkl)
Comment on attachment 621900 [details] [diff] [review]
patch v3

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

Looks good by inspection. r=dkl

::: template/en/default/email/newchangedmail.txt.tmpl
@@ +64,5 @@
> +
> +Referenced [% terms.Bugs %]:
> +
> +[% FOREACH ref = referenced_bugs %]
> +[%+ urlbase %]show_bug.cgi?id=[% ref.id %]

Nit: fix on checkin

[%+ urlbase FILTER none %]show_bug.cgi?id=[% ref.id FILTER url_quote %]

(Note: "FILTER uri" for 4.2)
Attachment #621900 - Flags: review?(dkl) → review+
Blocks: 753319
thanks dkl :)

> (Note: "FILTER uri" for 4.2)
this patch won't apply without reasonable work to 4.2, i've moved that to bug 753319.

Committing to: bzr+ssh://bjones%40mozilla.com@bzr.mozilla.org/bmo/4.0/
modified Bugzilla/BugMail.pm
modified extensions/SecureMail/Extension.pm
modified template/en/default/email/newchangedmail.txt.tmpl
Committed revision 8172.

Committing to: bzr+ssh://bjones%40mozilla.com@bzr.mozilla.org/bugzilla/extensions/securemail/4.0/
modified Extension.pm
Committed revision 20.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Blocks: 753396
:glob, thanks! This will make bugzilla so much more usable!
I'd kiss you, but that would be interpreted the wrong way.
Blocks: 754775
Wow! Thank you! This works wonderful.
Status: RESOLVED → VERIFIED
Depends on: 760163
Is there some work going on to upstream this bmo-only feature, to fix bug 97956?
See Also: → 97956
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: