Opened 11 years ago
Last modified 2 years ago
#11856 new enhancement
Default values of ticket workflow fields should be configured in the [ticket-workflow] section
| Reported by: | Ryan J Ollos | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | next-dev-1.7.x | 
| Component: | ticket system | Version: | |
| Severity: | normal | Keywords: | workflow | 
| Cc: | Branch: | ||
| Release Notes: | |||
| API Changes: | |||
| Internal Changes: | |||
Description (last modified by )
The fields resolution and status in the list of Ticket.protected_fields (tags/trac-1.0.2/trac/ticket/model.py@:51-52#L49) are only modified by the workflow. #2045 moves Trac one step closer to adding owner to Ticket.protected_fields and only allowing the workflow to change the owner field (see comment:60:ticket:2045).
Having default_resolution and default_owner as attributes of a ticket workflow action and configured through the [ticket-workflow] section rather than the [ticket] section has a few advantages:
- It should be clear that these fields are controlled by the ticket workflow.
 - Unique default values can be provided for each action in the workflow.
 
I've also found the attribute names set_owner and set_resolution to be a bit confusing. We might consider renaming these to resolutions / owners or allowed_resolutions / allowed_owners.
For completeness, we could also consider adding restrict_owner as a workflow attribute, replacing or overriding [ticket] restrict_owner. This was mentioned in comment:1:ticket:11976.
Attachments (0)
Change History (14)
follow-up: 2 comment:1 by , 11 years ago
comment:2 by , 11 years ago
Replying to rjollos:
On second thought I think the constraint of having a ticket in the new state doesn't depend on this ticket, though #11858 is somewhat important to completely eliminating that constraint. However, after this ticket is implemented we can discuss in the documentation how the population of the owner field can be driven by the workflow.
Documentation updated in 1.1/TracWorkflow@7.
comment:3 by , 11 years ago
To support all possible use cases related to #7979, we might want to have a special <user> value that refers to the currently logged-in user. That would support two cases not handled by set_owner_to_self:
- Specifying a restricted set of users via the 
set_ownerattribute and including the currently logged-in user in that set. - Specifying the currently logged-in user as the 
default_owner. 
comment:4 by , 11 years ago
| Milestone: | next-dev-1.1.x → 1.1.4 | 
|---|
comment:5 by , 11 years ago
#10913 closed as a duplicate, requesting the ability to set a default value for the set_owner workflow operation.
comment:6 by , 11 years ago
| Owner: | set to | 
|---|---|
| Status: | new → assigned | 
comment:8 by , 11 years ago
| Milestone: | 1.1.5 → 1.2 | 
|---|
comment:10 by , 10 years ago
| Milestone: | 1.1.6 → next-dev-1.1.x | 
|---|---|
| Owner: | removed | 
| Status: | assigned → new | 
comment:11 by , 10 years ago
| Description: | modified (diff) | 
|---|
comment:12 by , 10 years ago
| Milestone: | next-dev-1.1.x → next-dev-1.3.x | 
|---|
Narrowing focus for milestone:1.2. Please move ticket to milestone:1.2 if you intend to fix it.



  
TODO After this ticket is implemented we can redefine the documented constraints on the ticket workflow (wiki:1.1/TracWorkflow#BasicTicketWorkflowCustomization):