Changes between Version 20 and Version 21 of WorkFlow
- Timestamp:
- Jan 30, 2006, 3:50:36 PM (18 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
WorkFlow
v20 v21 63 63 64 64 == Plugabble Workflow == 65 For more complex ticket workflow requirements an extension point isavailable,65 For more complex ticket workflow requirements two extension points are available, 66 66 allowing full control of the ticket workflow process. 67 67 68 68 {{{ 69 69 #!python 70 class ITicketManipulator(Interface): 71 """ 72 ITicketManipulator implementations are used to perform filtering of 73 visible fields and validation. 74 """ 75 76 # Control ticket fields 77 def filter_ticket_fields(req, ticket, fields): 78 """ Given a list of ticket.Field objects and a ticket, return the 79 filtered list of fields. Called just prior to ticket display. """ 80 81 def validate_ticket(req, ticket): 82 """ Validate a ticket. Called just before the ticket is updated with 83 user supplied values from req.args. """ 84 70 85 class ITicketWorkflow(Interface): 71 """ This interface controls what actions can be performed on a ticket and 72 also a list of the available ticket fields. """ 86 """ This interface controls what actions can be performed on a ticket. """ 73 87 74 88 # Control ticket actions … … 77 91 ticket and the request object provided. """ 78 92 79 def get_ticket_action (req, ticket, action):93 def get_ticket_action_controls(req, ticket, action): 80 94 """ Return a trac.ticket.field.Field object for ticket action. """ 81 95 82 96 def apply_ticket_action(req, ticket, action): 83 97 """ Perform action on ticket. """ 84 85 # Control ticket fields86 def filter_ticket_fields(req, ticket, fields):87 """ Given a list of ticket.Field objects and a ticket, return the88 filtered list of fields. This method must enforce permission89 control on all fields. """90 91 def update_ticket_fields(req, ticket):92 """ Apply changes in req to ticket. By default this should simply be93 `ticket.populate(req.args)`. """94 98 }}} 95 99