#8681 closed enhancement (fixed)
Tickets do not allow subscribing as a user rather than via hardcoded email address
| Reported by: | Mitar | Owned by: | |
|---|---|---|---|
| Priority: | low | Milestone: | next-major-releases |
| Component: | ticket system | Version: | 0.11.4 |
| Severity: | normal | Keywords: | patch cc user email |
| Cc: | mmitar@…, exarkun@…, bill@…, Ryan J Ollos, chealer@… | Branch: | |
| Release Notes: | |||
| API Changes: | |||
| Internal Changes: | |||
Description (last modified by )
Allow adding usernames to a ticket CC list instead of e-mail addresses for users which only have the permission to select a checkbox to add themselves to the CC list (and thus cannot control whether to add an address or a user identifier). For our setup it would be enough to just add a project-wide configuration switch which would tell Trac whether to prefer usernames or e-mail addresses.
Attachments (0)
Change History (21)
comment:1 by , 17 years ago
comment:2 by , 17 years ago
That is so only because your username does not have e-mail address set up in Trac. In _toggle_cc method there is this code:
entries = []
email = req.session.get('email', '').strip()
if email:
entries.append(email)
if req.authname != 'anonymous':
entries.append(req.authname)
...
if remove:
action, entry = ('remove', remove[0])
elif add:
action, entry = ('add', add[0])
return (action, entry, cc_list)
So it uses e-mail address if there is one or username. If I change last lines to:
if remove:
action, entry = ('remove', remove[0])
elif add:
action, entry = ('add', add[-1])
return (action, entry, cc_list)
it prefers username.
comment:4 by , 16 years ago
| Cc: | added |
|---|
follow-up: 9 comment:5 by , 16 years ago
Should it ever prefer email address? Usernames are more robust (that is, less likely to change). Plus, adding email addresses means more places for spammers to scrape information from. Also, querying for tickets a user is CC'd on becomes harder, because they might have to search for multiple values.
comment:6 by , 16 years ago
I agree. Especially because Trac does not support multiple owners of the ticket. So if multiple persons are working on a ticket they are often listed in CC field. So usernames are also preferred in this case.
follow-up: 10 comment:9 by , 16 years ago
| Keywords: | cc user email added |
|---|---|
| Milestone: | next-minor-0.12.x → next-major-0.1X |
| Priority: | normal → low |
Replying to anonymous:
Should it ever prefer email address? Usernames are more robust (that is, less likely to change)
The idea was that you should better grab an e-mail address when you have one, session data is purged after a while.
In later iterations of the notification subsystem, if the e-mail addresses are stored differently, maybe this could be changed.
follow-up: 11 comment:10 by , 16 years ago
Replying to cboos:
session data is purged after a while.
Even for registered users? Is there a way to disable/configure this?
comment:11 by , 16 years ago
comment:12 by , 16 years ago
I am using on a production Trac system above changes and it works well. So only that small change is necessary to prefer usernames before e-mail address. But probably this should be configurable so there is need for some additional code.
comment:13 by , 16 years ago
If it is not visible: it is just necessary to change 0 index to -1 index.
comment:16 by , 14 years ago
Replying to Mitar:
I made a plugin for this.
Thanks - especially for the quick response. That seems to work well. This does seem like a simple enough and desirable feature to have integrated in, but this works for now.
comment:17 by , 12 years ago
| Summary: | Allow adding usernames to a ticket CC list → [PATCH] Allow adding usernames to a ticket CC list |
|---|
using the following PATCH of web_ui.py (under 0.12) solves the problem for me with permission of PrivateTicketsPlugin (#th11862)
-
web_ui.py
old new 647 647 of CC status for this user relative to the current `cc_list`.""" 648 648 entries = [] 649 649 email = req.session.get('email', '').strip() 650 if email:651 entries.append(email)650 # if email: 651 # entries.append(email) 652 652 if req.authname != 'anonymous': 653 653 entries.append(req.authname) 654 elif email: 655 entries.append(email) 654 656 else: 655 657 author = get_reporter_id(req, 'author').strip() 656 658 if author and author != 'anonymous':
perhaps there will be some side-effects…
comment:18 by , 12 years ago
| Cc: | added |
|---|
comment:19 by , 11 years ago
| Keywords: | patch added |
|---|
follow-up: 21 comment:20 by , 5 months ago
| Cc: | added |
|---|---|
| Description: | modified (diff) |
| Priority: | low → high |
| Resolution: | → fixed |
| Status: | new → closed |
| Summary: | [PATCH] Allow adding usernames to a ticket CC list → Tickets do not allow subscribing as a user rather than via hardcoded email address |
Thank you for reporting Mitar, and thanks for the patch Holger
This is clearly an important issue, but if my reading of the code is right, this is solved in 1.4 and above, thanks to Ryan J Ollos’s changeset 15737, which effectively applies the proposed patch.
This comment is from Philippe "Chealer" Cloutier. I am subscribing to this ticket, but notifications seem to be broken, and I struggle to display my full email address or link to my contact information from this comment. My email address is available on Kune ni povos’s contact page. All of my comments and contributions in this ticket are offered under the terms of CC0 1.0 (unless otherwise noted).
comment:21 by , 5 months ago
| Priority: | high → low |
|---|
This is clearly an important issue, but if my reading of the code is right, this is solved in 1.4 and above, thanks to Ryan J Ollos’s changeset 15737, which effectively applies the proposed patch.
That is fixed in [15736] (comment:4:ticket:12724, in Trac 1.2.3).



This already seems to be working in trac at http://sourceforge.net/apps/trac shows it as:
Add to Cc: myusername [ ]
and
Remove from Cc: myusername [ ]
when editing a ticket.
Not sure how to configure it though.
stefan