Edgewall Software

Changes between Version 20 and Version 21 of WorkFlow


Ignore:
Timestamp:
Jan 30, 2006, 3:50:36 PM (18 years ago)
Author:
Alec Thomas
Comment:

Added ITicketManipulator

Legend:

Unmodified
Added
Removed
Modified
  • WorkFlow

    v20 v21  
    6363
    6464== Plugabble Workflow ==
    65 For more complex ticket workflow requirements an extension point is available,
     65For more complex ticket workflow requirements two extension points are available,
    6666allowing full control of the ticket workflow process.
    6767
    6868{{{
    6969#!python
     70class 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
    7085class 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. """
    7387
    7488    # Control ticket actions
     
    7791            ticket and the request object provided. """
    7892
    79     def get_ticket_action(req, ticket, action):
     93    def get_ticket_action_controls(req, ticket, action):
    8094        """ Return a trac.ticket.field.Field object for ticket action. """
    8195
    8296    def apply_ticket_action(req, ticket, action):
    8397        """ Perform action on ticket. """
    84 
    85     # Control ticket fields
    86     def filter_ticket_fields(req, ticket, fields):
    87         """ Given a list of ticket.Field objects and a ticket, return the
    88             filtered list of fields. This method must enforce permission
    89             control on all fields. """
    90 
    91     def update_ticket_fields(req, ticket):
    92         """ Apply changes in req to ticket. By default this should simply be
    93             `ticket.populate(req.args)`. """
    9498}}}
    9599