Edgewall Software

Ticket #866 (closed enhancement: fixed)

Opened 4 years ago

Last modified 2 years ago

Usernames recognized as email addresses in ticket fields

Reported by: Paul DeMarco <paul@…> Owned by: cmlenz
Priority: high Milestone: 0.9
Component: ticket system Version: devel
Severity: normal Keywords:
Cc: wcrucius@…, ademar@…

Description

Before the session support, the reporter field was pre-populated with the username, but that wouldn't be recognized as an email address for notification.

Now with session support, its populated with the email address, which is great since now it will automatically have that person receiving emails.

The enhancement i'd like to see is using the already available session data (username -> email address), to recognize usernames in the reporter, assigned to/cc fields as valid notification targets, sending it to their currently set email address.

If your using USER in a report, but a user is mentioned in tickets by their username or their email address arbitrarily, then your reports may have missing data. If emails change, or because Trac changed behavior between versions, or they just dont always do things consistently then your reports could also have more groupings then there actually are.

Emails are longer and harder to type and remember especially when dealing with users besides yourself (i.e. putting their names into the assigned to/cc fields). You might not even know their email address.

While were at it :), a session preference for receiving email (on/off) would similarly be useful. So they can override the email feature if enabled globally.

If you guys agree that the enhancement is a good one as-is, or with some functional revision, I'd like to work on a patch for it.

Attachments

Ticket_866.patch (3.9 KB) - added by wcrucius@… 4 years ago.
Enhancement to address this ticket and #395, #460, and #464

Change History

Changed 4 years ago by Paul DeMarco <paul@…>

For reference:

I just found this posting from Cap in the mailing list archive http://lists.edgewall.com/archive/trac/2004-June/000412.html, it describes an almost identical proposed change, as well as several tickets #460 and #464 that have related comments on how emails should be recognized/handled.

Changed 4 years ago by wcrucius@…

Enhancement to address this ticket and #395, #460, and #464

Changed 4 years ago by wcrucius@…

  • cc wcrucius@… added

This appears to also apply to #395, #460, and #464.

I have attached a patch for Notify.py (and db_default.py) that changes the following:

1. Adds an option to always_notify_owner (in addition to always_notify_reporter) 2. After building the list of usernames to notify, each username in the list is checked to see if it looks like an email address (using the same simple "'@' In <username>" filter that was already in use) and if not, it attempts to look up the email address for the username in the session table.

If I've done it correctly (of course "it works for me"), then it should addresses everyone's concerns (except the request to change CC: to something else).

I am by no means a python guru, so feel free to critique...

Changed 4 years ago by ademar@…

  • cc wcrucius@… added; wcrucius@… removed

From the FAQ:

""" 5.3 How can I associate usernames (e.g. for assigned tickets) with email addresses for notification?

FIXME: I'd really like to know.... Can Trac automatically relate user "joesmith" to email address "joesmith@…", so that we don't have to manually add CC: entries? """

I recently installed trac in the hope of getting rid of the complexity of bugzilla, but the notification system is really not working for me. The only way I found to add notification e-mails was by putting someone into CC.

I'm ok with using e-mail addresses for assigned-to, reporter, etc since it escalates well (as bugzilla does). But in my tests there's no relation between the user (http user) and the e-mail address besides the session control.

My sugestion is to concentrate some effort into the user-management and sessiosn schema (maybe associating users with e-mails using trac-admin?) because the current implementation is the only thing I didn't like about trac (the software is great and surelly is promissing) :-)

Changed 4 years ago by ademar@…

  • cc wcrucius@…, ademar@… added; wcrucius@… removed

Adding myself to the CC, but I don't know if the CC: uses commas, spaces or what to add multiple entries...

Changed 4 years ago by ademar@…

Hi Wesley.

It surely is a nice improvement and I'll give it a try. I'm just not sure if "checking for e-mails in the session table" is the right-thing to do, since it requires end-user interation.

Thanks.

BTW, both comma and spaces work in the CC field :-)

Changed 4 years ago by ademar@…

Wesley, I'm using your patch now, it's working as expected. :-)

BTW, forgot to mention: the query "My Tickets" doesn't work when we set the owner using an e-mail address. It's a trivial fix.

Changed 4 years ago by cmlenz

  • owner changed from jonas to cmlenz
  • priority changed from normal to high
  • status changed from new to assigned
  • milestone set to 0.9

I'm working on integrating this patch ATM.

Changed 4 years ago by anonymous

  • status changed from assigned to closed
  • resolution set to fixed

Patch applied in [1343]. Thanks.

Add/Change #866 (Usernames recognized as email addresses in ticket fields)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
to The owner will change from cmlenz. Next status will be 'closed'
 
Note: See TracTickets for help on using tickets.