[PATCH] Support list of users as options list in ticket custom field
|Reported by:||Owned by:|
|Severity:||normal||Keywords:||patch ticket custom field|
|Cc:||jhn@…, andrew.c.martin@…, massimo.b@…, walty8@…||Branch:|
In the process of migrating from a Borland StarTeam install to Trac+SVN, I needed the ability to assign multiple users to a ticket. Borland provided the ability to include custom Change Request fields which could be limited to the list of valid users within the StarTeam project.
Attached is a patch which implements similar behavior in Trac. The patch introduces a simple variable replacement scheme to the options attribute of a custom ticket field. The INI section looks like this:
[ticket-custom] devtest_assigned = select devtest_assigned.label = Dev Tester Assigned devtest_assigned.options = $userlist
Code in ticket/api.py checks for a select custom field which has an options attribute of literally "$userlist". If such a field is found, the field is passed to the existing function eventually_restrict_owner() to insert the listing of valid users.
The attached trivial three-line patch appears to work well against Trac-0.11.3.
Change History (18)
follow-up: 5 comment:3 by , 9 years ago
|Status:||closed → reopened|
comment:7 by , 8 years ago
|Summary:||Support list of users as options list in ticket custom field [patch included] → [PATCH] Support list of users as options list in ticket custom field|