Ticket #222 (closed enhancement: fixed)
Opened 8 years ago
Last modified 2 years ago
'Assign to' as popup list
| Reported by: | anonymous | Owned by: | cmlenz |
|---|---|---|---|
| Priority: | high | Milestone: | 0.9 |
| Component: | ticket system | Version: | devel |
| Severity: | normal | Keywords: | users list assignment |
| Cc: | manuzhai@…, dserodio@…, bootsch@… | ||
| Release Notes: | |||
| API Changes: | |||
Description
It would be nice to add developers for 'Assign to' with trac-admin and have them show up in a popup list like the other ticket properties. This would eliminate the possibility of mis-spelled names.
Attachments
Change History
comment:1 Changed 8 years ago by anonymous
comment:2 Changed 8 years ago by daniel
Hmm, maybe it'd be useful to have a popup with 'registered' users and populate the field entirely with javascript... that'd be more flexible than having to duplicate the interface.
comment:3 Changed 8 years ago by daniel
Having the Session architecture, we could potentially use that data. It might be a too extensive list though.
comment:4 Changed 8 years ago by anonymous
- Version changed from 0.6 to 0.6.1
comment:5 Changed 8 years ago by anonymous
- Version changed from 0.6.1 to 0.6
comment:6 Changed 7 years ago by cmlenz
#573 has been marked as duplicate of this ticket. See that ticket for further comments.
Changed 7 years ago by ivanoe@…
- Attachment trac.ticket.222.diff added
patch: solution to the ticket using both apache password or trac 'permission' table's 'username'
comment:7 Changed 7 years ago by ivanoe@…
- Keywords users list assignment added
- Version changed from 0.6 to devel
The attachment trac.ticket.222.diff solves the issue in following ways:
- If the Environment variable TRAC_PWDFILE is defined in the httpd.conf Apache configuration, the list of users is taken from this passwordfile:
... <Location "/trac"> SetEnv TRAC_ENV /path/to/trac/project_trac.db SetEnv TRAC_PWDFILE "path/to/subversionpassword" </Location> ...
The value of TRAC_PWDFILE should be the same as the one configured for AuthUserFile? in section:
... <Location "/trac/login"> ... AuthUserFile "path/to/subversionpassword" ... </Location> ...
- Otherwise, the list of users is taken from the 'permission' table in trac.db. Only the end-users are included. The groups as explained in TracPermissions are not returned as is not 'anonymous' user.
- Empty string is also added to the list.
Please note: I tested only on Windows.
It could be cool if included into 0.8, but I am afraid that might be a bit too late for that...
comment:8 Changed 7 years ago by ivanoe
dummpy comment as it seems that the last change did not appear in the timeline.
comment:9 Changed 7 years ago by ivanoe
- Milestone set to 0.9
please ignore the changes to header.cs in the patch - they are related to the other change
comment:10 Changed 7 years ago by jonas
- Milestone changed from 0.9 to 2.0
This is a good idea but unfortunately we don't have way to get a complete list of available users without adding auth-specific code to Trac. I don't even think that's possible with some auth modules.
This will probably have to wait until Trac 2.0 where we will have real user support.
comment:11 Changed 7 years ago by cmlenz
#876 has been marked as a duplicate of this bug. That ticket also has a patch.
comment:12 Changed 7 years ago by cmlenz
#1028 has been marked as duplicate of this one. That ticket also has a patch.
comment:13 Changed 7 years ago by cmlenz
- Milestone changed from 2.0 to 0.9
- Owner changed from jonas to cmlenz
- Priority changed from normal to high
- Status changed from new to assigned
Changed 7 years ago by cmlenz
- Attachment patch-emailnotify-r1120.diff added
Slightly reworked pkou's patch from ticket #1028
comment:14 Changed 7 years ago by pkou <pkou at ua.fm>
The updated patch looks OK for me. Thank you for the feedback.
comment:15 Changed 7 years ago by Josh Burley <jburley@…>
This is working great for me, now. Awesome! This feature has basically gotten Trac accepted here :D (am consulting for a department within a Fortune 100 company).
comment:16 Changed 7 years ago by anonymous
- Cc manuzhai@… added
comment:17 Changed 7 years ago by cmlenz
- Resolution set to fixed
- Status changed from assigned to closed
This has been implemented in [1342]. The part of the patch related to sending ticket notifications to ticket owners will come later... Thanks pkou!
comment:18 Changed 7 years ago by anonymous
The always_notify_owner option included in the patch will be tracked using #866.
comment:19 Changed 7 years ago by Gunnar Wagenknecht <gunnar@…>
- Cc gunnar@… added
comment:20 Changed 6 years ago by Gunnar Wagenknecht <gunnar@…>
- Cc changed from manuzhai@gmail.com,gunnar@wageknecht.org to manuzhai@gmail.com, gunnar@wageknecht.org
comment:21 Changed 6 years ago by dserodio@…
- Cc dserodio@… added
Where is the list of users is taken from after all? In [1342], I can see a get_known_users method which queries
SELECT DISTINCT s.username, n.var_value, e.var_value FROM session AS s LEFT JOIN session AS n ON (n.sid IS NULL AND n.username=s.username AND n.var_name = 'name') LEFT JOIN session AS e ON (e.sid IS NULL AND e.username=s.username AND e.var_name = 'email') WHERE s.sid IS NULL ORDER BY s.username
But if I run this query on the SQLite prompt, I get:
SQL error: no such column: s.username
comment:22 Changed 6 years ago by anonymous
Adding dummy comment because the previous one didn't make it to the Timeline
comment:23 Changed 6 years ago by cmlenz
comment:24 Changed 6 years ago by dserodio@…
Thanks, now I achieved what I wanted: to "pre-fill" the set of user names with users that have never logged in.
See attached trac-users.py utility script that generates the INSERT statements for users contained in a htdigest or htpasswd files.
Changed 6 years ago by dserodio@…
- Attachment trac-users.py added
Generates INSERT statements for Trac users in a htdigest file, so they show up in the "owner" drop-down.
Changed 6 years ago by dserodio@…
- Attachment trac-users.2.py added
Oops, authenticated should be 1, not 0
comment:25 Changed 6 years ago by bootsch
- Cc bootsch@… added
Did someone create a patch for use with version 0.9.x?
The provided patches work on 0.8.x correct?
I really like the feature ;-) but had to move to 0.9 ;-(
comment:26 Changed 6 years ago by anonymous
comment:27 Changed 6 years ago by anonymous
Oops, I missed that indeed, thank you for pointing that out
comment:28 Changed 6 years ago by mmcneil@…
How can I delete the username of an old user from this assign-to drop-down list? Is there any way I can edit or pre-populate this list?
comment:29 Changed 6 years ago by eblot
There is no current way to edit this list, but tweaking the DB (using SQL commands).
Please ask further questions about this topic on the ML.
comment:30 Changed 6 years ago by eblot
comment:31 Changed 6 years ago by anonymous
- Cc gunnar@… removed
comment:32 Changed 4 years ago by landpro
Hello!
Can I use this patch with 10.4 version? If yes then how?
Thank you in advance.
comment:33 follow-up: ↓ 34 Changed 2 years ago by anonymous
How do you actually turn this on ?
comment:34 in reply to: ↑ 33 Changed 2 years ago by mrelbe <mikael@…>
Replying to anonymous:
How do you actually turn this on ?
The answer is stated in comment:26 above:
...and is documented in TracIni. Look for restrict_owner.



...and generally make it easier to set the field.