trac.ticket.default_workflow
¶
-
class
trac.ticket.default_workflow.
ConfigurableTicketWorkflow
¶ Bases:
trac.core.Component
Ticket action controller which provides actions according to a workflow defined in trac.ini.
The workflow is defined in the
[ticket-workflow]
section of the [wiki:TracIni#ticket-workflow-section trac.ini] configuration file.-
environment_created
()¶ When an environment is created, we provide the basic-workflow, unless a ticket-workflow section already exists.
-
get_actions_by_operation
(operation)¶ Return a list of all actions with a given operation (for use in the controller’s get_all_status())
-
get_actions_by_operation_for_req
(req, ticket, operation)¶ Return list of all actions with a given operation that are valid in the given state for the controller’s get_ticket_actions().
If state=’*’ (the default), all actions with the given operation are returned.
-
get_all_status
()¶ Return a list of all states described by the configuration.
-
get_allowed_owners
(req, ticket, action)¶ Returns users listed in the
set_owner
field of the action or possessing theTICKET_MODIFY
permission ifset_owner
is not specified.This method can be overridden in a subclasses in order to customize the list of users that populate the assign-to select box.
Since: 1.3.2
-
get_ticket_actions
(req, ticket)¶ Returns a list of (weight, action) tuples that are valid for this request and this ticket.
-
ticket_workflow_section
¶ The workflow for tickets is controlled by plugins. By default, there’s only a
ConfigurableTicketWorkflow
component in charge. That component allows the workflow to be configured via this section in thetrac.ini
file. See TracWorkflow for more details.
-
-
trac.ticket.default_workflow.
get_workflow_config
(config)¶ Usually passed self.config, this will return the parsed ticket-workflow section.
-
trac.ticket.default_workflow.
load_workflow_config_snippet
(config, filename)¶ Loads the ticket-workflow section from the given file (expected to be in the ‘workflows’ tree) into the provided config.
-
trac.ticket.default_workflow.
parse_workflow_config
(rawactions)¶ Given a list of options from [ticket-workflow]