Closed Bug 137261 Opened 22 years ago Closed 19 years ago

X-Bugzilla-Who: an email header specifying the bugzilla account that made these changes

Categories

(Bugzilla :: Email Notifications, enhancement, P3)

2.15
enhancement

Tracking

()

VERIFIED FIXED
Bugzilla 3.0

People

(Reporter: db48x, Assigned: altlist)

References

Details

Attachments

(1 file, 3 obsolete files)

I'd like this header so that I can mark bugmail read if I was the one who made
the change, since I probably still remeber what it was that I did.
Priority: -- → P3
Target Milestone: --- → Bugzilla 2.18
bug 126151 has another way of doing this, and is thus related.

If I were cooler, I'd make that bug depend on this one... or something like that.
i'd like it as a convenient way to killfile some folks who spam bugs (voting for
bug)
I was just chatting with Myk about such a feature (I called it X-Bugzilla-Actor)
and he thought it would be a Good Thing, and please file a bug. But, I did 
a quick query and found this bug.

I would find this immensely useful, for the "what did I say" and the "/ignore"
reasons noted above, and also to let me "give priority" to people that I'm 
actively working with. (And I think the X-... header is a better fix than 
changing the 'From', since changing that header will break many existing client
filter which key of the bugzilla-daemon@.. 
Summary: X-Bugzilla-Who: an email header specifying the the bugzilla account that made these changes → X-Bugzilla-Who: an email header specifying the bugzilla account that made these changes
Enhancements which don't currently have patches on them which are targetted at
2.18 are being retargetted to 2.20 because we're about to freeze for 2.18. 
Consideration will be taken for moving items back to 2.18 on a case-by-case
basis (but is unlikely for enhancements)
Target Milestone: Bugzilla 2.18 → Bugzilla 2.20
Bugzilla 2.20 feature set is now frozen as of 15 Sept 2004.  Anything flagged
enhancement that hasn't already landed is being pushed out.  If this bug is
otherwise ready to land, we'll handle it on a case-by-case basis, please set the
blocking2.20 flag to '?' if you think it qualifies.
Target Milestone: Bugzilla 2.20 → Bugzilla 2.22
*** Bug 285368 has been marked as a duplicate of this bug. ***
Bug 285368 had a patch to implement this (but it needed work).
Assignee: preed → email-notifications
QA Contact: mattyt-bugzilla → default-qa
Target Milestone: Bugzilla 2.22 → ---
Attached patch v1 patch (obsolete) — Splinter Review
Seems like all one needs are some changer (and changername) substitution variables.  You can then modify your newchangedmail parameter to add in the X-Bugzilla-Who attribute (and/or change the From line)
Attachment #203471 - Flags: review?(gerv)
> Seems like all one needs are some changer (and changername) substitution
> variables.

What happens if some emails have not been sent for a while and are sent concatenated? The last changer is attributed to X-Bugzilla-Who. Is that the desired effect?
(In reply to comment #9)
> > Seems like all one needs are some changer (and changername) substitution
> > variables.
> 
> What happens if some emails have not been sent for a while and are sent
> concatenated? The last changer is attributed to X-Bugzilla-Who. Is that the
> desired effect?

It's may not be ideal, but I don't think I would want multiple X-Bugzilla-Who values.
(In reply to comment #10)
> It's may not be ideal, but I don't think I would want multiple X-Bugzilla-Who
> values.

I agree. :)
Assignee: email-notifications → altlst
Comment on attachment 203471 [details] [diff] [review]
v1 patch

>@@ -621,4 +621,6 @@
>     $substs{"reasonsbody"} = $reasonsbody;
>     $substs{"space"} = " ";
>+    $substs{"changer"} = $values{'changer'};
>+    $substs{"changername"} = Bugzilla::User->new(&::DBNameToIdAndCheck($values{'changer'}))->name();
>     if ($isnew) {
>         $substs{'threadingmarker'} = "Message-ID: <bug-$id-" . 

Not sure we want 'changername'. First, the real name is not unique, and second it requires to build a user object. You should only keep 'changer'.

Another reason to deny review is that X-Bugzilla-Who should be added by default into the template, IMO. It's easier for an admin to remove it than to add it. And I'm pretty sure many people would be happy to be able to filter incoming email based on this header.
Attachment #203471 - Flags: review?(gerv) → review-
Target Milestone: --- → Bugzilla 2.24
(In reply to comment #12)
> Not sure we want 'changername'. First, the real name is not unique, and second
> it requires to build a user object. You should only keep 'changer'.

What's the harm of having both?  The Who field could then have 

  %changername% <%changer%>

Besides, we are already using the real name in our bugzilla comment headers, etc.  I don't understand why we have to do things differently here.

> Another reason to deny review is that X-Bugzilla-Who should be added by default
> into the template, IMO. It's easier for an admin to remove it than to add it.
> And I'm pretty sure many people would be happy to be able to filter incoming
> email based on this header.

That sounds reasonable

(In reply to comment #13)
> What's the harm of having both?  The Who field could then have 
> 
>   %changername% <%changer%>
> 
> Besides, we are already using the real name in our bugzilla comment headers,
> etc.  I don't understand why we have to do things differently here.

Because you cannot add any filter based on the real name as you can freely change it. OK, you can also change your email address, but this is much less likely; and people often change their real name to indicate when they will be on vacation, for instance: Foo Bar (away from ... to...).

And depending on your email client, it's probably easier to write:
X-Bugzilla-Who is altlst@sonic.net
than
X-Bugzilla-Who end with <altlst@sonic.net>
> Because you cannot add any filter based on the real name as you can freely
> change it. 

I can understand the arguments raised.  However, I feel this is too focused on the specific use of this param.  That is, I see no reason why we shouldn't include it, even if it is not useful for X-Who.  

In my situation, I'm using changername in the body text to highlight the poster real name.  My coworkers find that useful, rather than seeing just an email address (which coincidentally changed significantly at my company).
(In reply to comment #15)
> In my situation, I'm using changername in the body text to highlight the poster
> real name.  My coworkers find that useful, rather than seeing just an email
> address (which coincidentally changed significantly at my company).

OK, so what you say is that 'changername' is not used in the X-Bugzilla-Who header, which is the topic of this bug. You seem to agree that 'changername' should not go into this header, right? In this case 'changername' should not be part of this bug, IMO.
Attached patch v2 (obsolete) — Splinter Review
Discussed this further offline with Frederic.

Frederic writes:
> Here my deal: we keep both variables, but only put changer in the header.
> 
> And note that in order to spare one SQL call, you should use 
> Bugzilla::User->new_from_login() to directly get a user object using its 
> login name.

Updated patch included
Attachment #203471 - Attachment is obsolete: true
Attachment #211340 - Flags: review?(LpSolit)
Comment on attachment 211340 [details] [diff] [review]
v2

r=LpSolit
Attachment #211340 - Flags: review?(LpSolit) → review+
Status: NEW → ASSIGNED
Flags: approval?
Albert. By looking at the patch more closely, I realized that BugMail::sendMail() is called once per addressee, and so 'changername' is "recalculated" by far too many times, which could be a severe performance issue. You should move Bugzilla::User->new_from_login($values{'changer'})->name earlier in the code, together with $values{'changer'} = $forced->{'changer'}. This way you only have to write $substs{"changername"} = $values{"changername"} in sendMail().

Please fix that.
Flags: approval?
Attached patch v3 (obsolete) — Splinter Review
Updated patch, per comment #9
Attachment #211340 - Attachment is obsolete: true
Attachment #211406 - Flags: review?(LpSolit)
Comment on attachment 211406 [details] [diff] [review]
v3

>--- Bugzilla/BugMail.pm~	2005-03-08 10:27:27.000000000 -0800
>+++ Bugzilla/BugMail.pm	2005-03-08 16:29:52.000000000 -0800

>+    $values{'changer'} = $forced->{'changer'};
>+    $values{'changername'} = Bugzilla::User->new_from_login($values{'changer'})->name;

Nit: my $changer = $forced->{'changer'}; has been defined a few lines above these two and is used only once. We could use it here to make the code a little bit cleaner:

    $values{'changer'} = $changer;
    $values{'changername'} = Bugzilla::User->new_from_login($changer)->name;

Either attach a new patch with this nit fixed and carry forward my r+, or I will fix it on checkin. But I would prefer an updated patch. ;)

r=LpSolit
Attachment #211406 - Flags: review?(LpSolit) → review+
Flags: approval?
Attached patch v4Splinter Review
Updated patch.
Attachment #211406 - Attachment is obsolete: true
Attachment #211415 - Flags: review+
Flags: approval? → approval+
Checking in Bugzilla/BugMail.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/BugMail.pm,v  <--  BugMail.pm
new revision: 1.63; previous revision: 1.62
done
Checking in Bugzilla/Config/MTA.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Config/MTA.pm,v  <--  MTA.pm
new revision: 1.4; previous revision: 1.3
done
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Keywords: relnote
Blocks: 333326
*** Bug 126151 has been marked as a duplicate of this bug. ***
Added to the release notes as part of bug 349423.
Keywords: relnote
Status: RESOLVED → VERIFIED
I would like - no, I *need to* - to have "Mike Shaver" in my From column in Thunderbird, to efficiently process my bugspam.
That's bug 126151, but there's resistance.

For a poor man's fix, I could maybe configure my postfix to Change the From header to the X-Bugzilla-Who header content. But the lack of the realname makes this mostly useless. I don't want to see saw email addresses, but real names. So, the lack of changername in X-Bugzilla-Who makes it impossible to use this bug as workaround for 126151, as was proposed in that bug.

Please add changername. re comment 14: Filters can run on substrings. *All* my filters for persons run on substrings.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: