#7979 closed enhancement (duplicate)
New tickets should be able to default owner to the current user
Reported by: | Owned by: | Ryan J Ollos | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | ticket system | Version: | 0.11.2.1 |
Severity: | normal | Keywords: | |
Cc: | leho@… | Branch: | |
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
We use Trac very actively to manage our Dev tasks and not just as bug tracking system. We have much more tasks than defects or enhancements and in most of the cases Devs are filing tasks for themselves.
It would be very useful if "default_owner" ticket setting could support value like "$USER" meaning that currently logged-in user is pre-selected in the owner field on the new ticket form.
Attachments (0)
Change History (15)
follow-up: 2 comment:1 by , 16 years ago
comment:2 by , 16 years ago
Replying to ebray:
This could also be accomplished with a very simple plugin.
There does not seem to be a pre-written plugin for accomplishing this task. I too see a value in supporting the $USER variable in the default_owner section of the ini rather than hacking it into the site template.
comment:3 by , 15 years ago
Cc: | added |
---|
comment:4 by , 15 years ago
Cc: | added |
---|
comment:5 by , 14 years ago
Keywords: | owner USER added |
---|---|
Milestone: | next-minor-0.12.x → unscheduled |
comment:6 by , 12 years ago
bit ugly, and only tested in limited circumstances, but might help someone…
-
trac/ticket/model.py
old new class Ticket(object): 217 217 # _something_ else, even if that something else is blank. 218 218 self['owner'] = default_to_owner 219 219 220 if self.values.get('owner') == '< reporter >': 221 default_to_reporter = '' 222 if self.values.get('reporter'): 223 default_to_reporter = self['reporter'] 224 self['owner'] = default_to_reporter 225 220 226 # Perform type conversions 221 227 values = dict(self.values) 222 228 for field in self.time_fields:
comment:7 by , 12 years ago
Milestone: | unscheduled → next-dev-1.1.x |
---|---|
Owner: | set to |
Status: | new → assigned |
Or just ... self['owner'] = self.values.get('reporter', '')
?
I'm no fan of such kind of special values, but we started the trend with < default >
, so…
comment:8 by , 11 years ago
Cc: | added |
---|
comment:9 by , 11 years ago
Cc: | removed |
---|
comment:10 by , 11 years ago
Cc: | added; removed |
---|
comment:11 by , 10 years ago
Requested also in SO:24675086. Implementing the proposed changes in #2045 will allow set_owner_to_self
to be used in the <none> -> new
transition (comment:38:ticket:2045).
comment:12 by , 10 years ago
Milestone: | next-dev-1.1.x → 1.1.3 |
---|---|
Owner: | changed from | to
This ticket will be closed as a duplicate of #2045, but before closing this ticket I'll provide a [ticket-workflow]
recipe.
comment:13 by , 10 years ago
Cc: | removed |
---|---|
Keywords: | owner USER removed |
Milestone: | 1.1.3 |
Resolution: | → duplicate |
Status: | assigned → closed |
With #2045 implemented, the default create actions are:
create = <none> -> new create.default = 1 create_and_assign = <none> -> assigned create_and_assign.label = assign create_and_assign.operations = may_set_owner create_and_assign.permissions = TICKET_MODIFY
To have the create
action assign to the current user, just add:
create.operations = set_owner_to_self
Renaming the action might be appropriate, putting the ticket into either the assigned or accepted state:
create_and_accept = <none> -> accepted create_and_accept.label = accept create_and_accept.default = 1 create_and_accept.operations = set_owner_to_self
See ticket #11856 for proposed changes that will replace the [ticket] default_owner
option, and particularly comment:3:ticket:11856.
follow-up: 15 comment:14 by , 9 years ago
There does not seem to be a pre-written plugin for accomplishing this task. I too see a value in supporting the $USER variable in the default_owner section of the ini rather than hacking it into the site template.
Is the $USER variable supported in the default_owner section yet?
comment:15 by , 9 years ago
Replying to David Banner <dbwonderchild@…>:
Is the $USER variable supported in the default_owner section yet?
No, and it probably won't be added. You can achieve the equivalent in Trac 1.1.3 and later as described in comment:13.
This could also be accomplished with a very simple plugin.