Edgewall Software
Modify

Opened 4 years ago

Closed 3 years ago

#9247 closed enhancement (duplicate)

Notification checks should check full name and e-mail too

Reported by: Marcus Lindblom <macke@…> Owned by:
Priority: normal Milestone:
Component: notification Version: 0.11.5
Severity: minor Keywords: needinfo
Cc:
Release Notes:
API Changes:

Description

We've recently switched our committer textsfrom plain 'username' to Firstname Lastname <email@…>.

Now everyone gets notifications, even if the same full name and e-mail is set in Trac. It'd be nice if Trac could expand the check to also match agains these, to reduce e-mail.

Attachments (0)

Change History (8)

comment:1 Changed 4 years ago by Marcus Lindblom <macke@…>

If it wasn't obvious from context, we have never_notify_updater = True, which worked well before.

comment:2 Changed 4 years ago by rblank

  • Keywords needinfo added

I'm afraid I don't understand the precise situation you describe. Could you please elaborate?

Also, there's no never_notify_updater setting. Did you mean always_notify_updater = False instead?

comment:3 follow-up: Changed 4 years ago by marcusl

Our commit-hook adds info to comments, i.e. "Changed foobar initalization. Fixed #42". Previously, the commiter name was the same as the Trac user-name 'marcusl' (for me), now it is 'Marcus Lindblom <marcus.lindblom@…>'.

When I push commits to our server, I get a notification by the commit-comments added to tickets. I did not previously, as Trac didn't send tickets to the updater (i.e. myself in this case), but now, since I push commits with my full name (and email) instead of only a short username (that matched my account in our local trac) I get e-mails each time I push changes referring to a ticket.

Trac doesn't seem to check more than username (or at least, it didn't in 0.11.5), whereas it'd be nice if it tried to parse the committers name for the common pattern: [A-Z ]+) <[a-z@.]>

I suppose it's configured 'always_notify_updater = false' as you say (not at work right now, so can't check). (I confused myself with the discussion on #2247.)

comment:4 in reply to: ↑ 3 Changed 4 years ago by rblank

Ok, now I understand the use case. Previously, you had the same value for the committer name and the Trac user name. Now, your committer name includes your full name and e-mail address, and your Trac user name is still a short name.

I don't understand how this could affect ticket notification, though. Do you have an e-mail address configured in Trac?

Replying to marcusl:

Trac doesn't seem to check more than username (or at least, it didn't in 0.11.5), whereas it'd be nice if it tried to parse the committers name for the common pattern: [A-Z ]+) <[a-z@.]>

What do you mean by "check more than username"? What check do you refer to?

The ticket updater hook has been converted to a component in 0.12, so it's unlikely that we would fix the script in 0.11-stable. Also, the new component can be configured not to send notifications at all on automatic comments. Would you have the possibility to test /trunk and see if it works for you?

comment:5 Changed 4 years ago by macke@…

Precisely. (sorry for not being more clear… :-|)

Yup. The full name and e-mail is configured for each user in Trac.

No fix for 0.11.x is understandable. I can try and check how trunk behaves, and apply a patch if necessary.

(Notifications from automatic comments are good, but when always_notify_updater is false, notifications should never go to the original writer.)

comment:6 Changed 4 years ago by cboos

  • Resolution set to worksforme
  • Status changed from new to closed

In case the problem persists with 0.12, please reopen.

comment:7 Changed 3 years ago by Marcus Lindblom <macke@…>

  • Resolution worksforme deleted
  • Status changed from closed to reopened

Upgraded to 0.12 last week. Just got commit hooks working properly again. (Nice work btw).

It might be that I've used the http://trac-hacks.org/wiki/NeverNotifyUpdaterPlugin and it stopped working.

I'm re-opening this anyway with more info which will hopefully help you decide what to do.

The problem is that the following commit sent me an e-mail. I'd like it not to do that.

changeset:   1886:e2f3ddf9891e
tag:         tip
user:        Marcus Lindblom <marcus.lindblom@orzone.se>
date:        Tue Nov 02 10:28:25 2010 +0100
files:       .hgignore
description:
Dummy commit to test trac hook. see #10

I got this mail:

#10: Fix mercurial commit hooks for trac & buildbot
------------------------------------------+-----------------------------
------------------------------------------+----
           Reporter:  marcusl             |              Owner:  marcusl
               Type:  defect              |             Status:  closed 
           Priority:  high                |          Milestone:         
          Component:  Dev/Infrastructure  |         Resolution:  fixed  
           Keywords:                      |         Blocked By:         
    Estimated Hours:  0.5                 |           Blocking:         
Add Hours to Ticket:  0                   |        Total Hours:  0.1    
          Billable?:  0                   |   Code Reviewed by:  n/a    
------------------------------------------+-----------------------------
------------------------------------------+----

Comment (by Marcus Lindblom <marcus.lindblom@…>):

 In [e2f3ddf9891ed57663382b967aa614563e37929c/orcamp]:
 
 #!CommitTicketReference repository="orcamp"
 revision="e2f3ddf9891ed57663382b967aa614563e37929c"
 Dummy commit to test trac hook. see #10 

Even though marcusl has the full name and e-mail in the Trac session id:

Trac [/var/lib/trac/orcamp]> session list marcusl

SID      Name             Email
---------------------------------------------------
marcusl  Marcus Lindblom  marcus.lindblom@orzone.se

And I've disabled updater notification:

[notification]
always_notify_owner = true
always_notify_updater = false

Maybe it's the conflict between these two that gets me a mail, and the NeverNotifyUpdater? plugin solves that for me.

comment:8 Changed 3 years ago by cboos

  • Resolution set to duplicate
  • Status changed from reopened to closed

Also one situation that could be fixed by the solution proposed in #9971.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none) to the specified user.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.