Package trac :: Package ticket :: Module default_workflow :: Class ConfigurableTicketWorkflow

Class ConfigurableTicketWorkflow

source code

    object --+    
             |    
core.Component --+
                 |
                ConfigurableTicketWorkflow

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.

Nested Classes

Inherited from core.Component: __metaclass__

Instance Methods
 
ticket_workflow_section(...)
The workflow for tickets is controlled by plugins.
source code
 
__init__(self, *args, **kwargs)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
environment_created(self)
When an environment is created, we provide the basic-workflow, unless a ticket-workflow section already exists.
source code
 
environment_needs_upgrade(self, db)
The environment needs an upgrade if there is no [ticket-workflow] section in the config.
source code
 
upgrade_environment(self, db)
Insert a [ticket-workflow] section using the original-workflow
source code
 
get_ticket_actions(self, req, ticket)
Returns a list of (weight, action) tuples that are valid for this request and this ticket.
source code
 
get_all_status(self)
Return a list of all states described by the configuration.
source code
 
render_ticket_action_control(self, req, ticket, action) source code
 
get_ticket_changes(self, req, ticket, action) source code
 
apply_action_side_effects(self, req, ticket, action) source code
 
get_all_actions(self) source code
 
get_actions_by_operation(self, operation)
Return a list of all actions with a given operation (for use in the controller's get_all_status())
source code
 
get_actions_by_operation_for_req(self, 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().
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Static Methods

Inherited from core.Component: implements

Class Variables
  operations = ('del_owner', 'set_owner', 'set_owner_to_self', '...
Properties

Inherited from object: __class__

Method Details

ticket_workflow_section(...)

source code 

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 the trac.ini file. See TracWorkflow for more details.

(''since 0.11'')

__init__(self, *args, **kwargs)
(Constructor)

source code 
x.__init__(...) initializes x; see help(type(x)) for signature
Overrides: object.__init__
(inherited documentation)

get_actions_by_operation_for_req(self, req, ticket, operation)

source code 

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.


Class Variable Details

operations

Value:
('del_owner',
 'set_owner',
 'set_owner_to_self',
 'set_resolution',
 'del_resolution',
 'leave_status',
 'reset_workflow')