Opened 16 years ago
Last modified 4 years ago
#8069 new enhancement
[PATCH] Support list of users as options list in ticket custom field
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | normal | Milestone: | next-dev-1.7.x |
Component: | ticket system | Version: | 0.11.3 |
Severity: | normal | Keywords: | patch ticket custom field |
Cc: | jhn@…, andrew.c.martin@…, massimo.b@…, walty8@… | Branch: | |
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
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.
Attachments (2)
Change History (20)
by , 16 years ago
Attachment: | ticket custom user list-trac0.11.3.patch added |
---|
comment:2 by , 15 years ago
The resolution is wrong, #2662 ticket is talking about something different.
This is not spam
follow-up: 5 comment:3 by , 14 years ago
Milestone: | → unscheduled |
---|---|
Resolution: | duplicate |
Status: | closed → reopened |
This ticket is indeed not a duplicate of #2662. Maybe the reference was wrong?
follow-up: 7 comment:4 by , 14 years ago
attached patch does not work well with 0.12. Will a patch for 0.12 be released?
comment:5 by , 14 years ago
Keywords: | field added |
---|
Replying to rblank:
Maybe the reference was wrong?
No, this was an attempt of consolidating slightly different ways to approach the "multiple users assigned to a ticket" feature, which was also the starting point for this ticket according to the description.
See ticket:2662#comment:27 (this is one of the interests of the "timeline" links, as that comment was done right after comment:1 ;-) ).
Note that solution suggested in this ticket is also related to dynamic fields (#4374 and #4549).
comment:6 by , 14 years ago
Cc: | added |
---|
by , 13 years ago
Attachment: | ticket_custom_user_list-trac0.12.dev.patch added |
---|
patch for trac 0.12-stable
comment:7 by , 13 years ago
Cc: | added |
---|---|
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 |
Replying to jatyap <jatyap@…>:
attached patch does not work well with 0.12. Will a patch for 0.12 be released?
I've posted attachment:ticket_custom_user_list-trac0.12.dev.patch, which performs the same functionality as the original patch included with this ticket.
One issue to note: in both patches if a user logs in to trac for the first time ever, the custom fields which use the $userlist
macro will not be updated until trac is restarted. I assume this is related to the @cached
method decorator on def custom_fields
.
Updated ticket summary with "[PATCH]" convention…
follow-up: 10 comment:9 by , 12 years ago
@Andrew: Slightly off topic - did you use software to convert StarTeam CRs, milestones and such to Trac? If so, is it available somewhere? I'm aware of some softwares to do the changeset conversion to a different VCS, but not ticket conversion.
comment:11 by , 9 years ago
Status: | reopened → new |
---|
comment:12 by , 8 years ago
Cc: | added |
---|
comment:13 by , 8 years ago
Cc: | added |
---|
comment:15 by , 7 years ago
TracUserSelectFieldPlugin has implemented a simple version of a user field. Comments on implementation in th:#13268.
comment:16 by , 6 years ago
See also comment:4:ticket:11469, which proposes a ICustomFieldTypeProvider
interface.
comment:17 by , 5 years ago
Milestone: | unscheduled → next-dev-1.5.x |
---|
patch which implements this enhancement request