Description of problem: Bugzilla notification email already contain a list of headers that contain information about a bugs status. For example these: X-Bugzilla-Reason: X-Bugzilla-Type: X-Bugzilla-Watch-Reason: X-Bugzilla-Classification: X-Bugzilla-Product: X-Bugzilla-Version: X-Bugzilla-Component: X-Bugzilla-Keywords: X-Bugzilla-Severity: X-Bugzilla-Comment: X-Bugzilla-Who: X-Bugzilla-Status: X-Bugzilla-Priority: X-Bugzilla-Assigned-To: X-Bugzilla-Target-Milestone: X-Bugzilla-Changed-Fields: It would be great if there was a field for X-Bugzilla-Flags: or something similar and if any flags are set (devel_ack, exception, pm_ack, etc.) they would be listed in the email headers.
Created attachment 322815 [details] v1 of patch to add flags to the mail headers of bug mail notifications Hi Dave, Attached is a patch that would add the Flags of the bug to the mail headers of the bug's email notifications, the patch is on bz-web2-test for testing i have made some tests and you can see the email examples in the data/mailer.testfile file in the bz-web2 server. Noura
Comment on attachment 322815 [details] v1 of patch to add flags to the mail headers of bug mail notifications >Index: Bugzilla/BugMail.pm >+ # REDHAT EXTENSION START 470345 >+ my $bug_flags = Bugzilla::Flag->match({ 'bug_id' => $id, >+ 'target_type' => 'bug' }); >+ my @visible_flags; >+ for my $f (@$bug_flags){ >+ my $f_type = Bugzilla::FlagType->new({ name => $f->name }); >+ if (defined $f_type && $user->can_see_flag($f_type)) { >+ push(@visible_flags, $f->name . $f->status); >+ } >+ } >+ # REDHAT EXTENSION END 470345 Nit-Pick: You can shorten this some by doing the following way: my @visible_flags; for my $f (@$bug_flags){ if (defined $f->type && $user->can_see_flag($f->type)) { push(@visible_flags, $f->name . $f->status); } } Looks good Noura. Dave
Thanks for the review Dave, committed to cvs after applying your suggestion. Andy the feature should be live in the next release which is usually on Thursdays. Noura
Sweet. Thanks!
Reopening as we should extend this to also include the requestee if one is set for a particular flag.
Created attachment 348679 [details] Patch to add flag requestees to the mail headers of bug mail notifications (v1)
Comment on attachment 348679 [details] Patch to add flag requestees to the mail headers of bug mail notifications (v1) hey Dave, Patch looks good and works fine. Thanks, Noura
Created attachment 349328 [details] Patch to add flag requestees to the mail headers of bug mail notifications (v2) Found an issue where $f->requestee is a user object and so instead I needed to be using the value for $f->requestee->login for the flag text to be added to the email header. Committed to SVN and will be in the next Bugzilla update. Dave