#866 closed enhancement (fixed)
Usernames recognized as email addresses in ticket fields
Reported by: | Owned by: | Christopher Lenz | |
---|---|---|---|
Priority: | high | Milestone: | 0.9 |
Component: | ticket system | Version: | devel |
Severity: | normal | Keywords: | |
Cc: | wcrucius@…, ademar@… | Branch: | |
Release Notes: | |||
API Changes: | |||
Internal Changes: |
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 (1)
Change History (9)
comment:1 by , 20 years ago
by , 20 years ago
Attachment: | Ticket_866.patch added |
---|
comment:2 by , 20 years ago
Cc: | 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:
- Adds an option to always_notify_owner (in addition to always_notify_reporter)
- 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…
comment:3 by , 20 years ago
Cc: | added; 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) :-)
comment:4 by , 20 years ago
Cc: | added; removed |
---|
Adding myself to the CC, but I don't know if the CC: uses commas, spaces or what to add multiple entries…
comment:5 by , 20 years ago
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 :-)
comment:6 by , 20 years ago
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.
comment:7 by , 20 years ago
Milestone: | → 0.9 |
---|---|
Owner: | changed from | to
Priority: | normal → high |
Status: | new → assigned |
I'm working on integrating this patch ATM.
comment:8 by , 20 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Patch applied in [1343]. Thanks.
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.