Search code examples
workflowtrac

Adding Multi-User Approval Process in trac Workflow


I have selected trac for my organization's project management tool; and I'd like to modify the default workflow as follows:

  • A new "enhancement" ticket can be created by all members
  • All new "enhancement" tickets need to be approved by the same 4 people before it can be assigned to a developer for work. "defect" & "task" tickets need not have the approval process.

I know I have to modify the [ticket-workflow] area of the trac.ini; but I can't figure out how to limit developer assignment until the ticket has essentially been approved.

I understand this is not an optimal workflow/process; but it's something that I have inherited and have to conform to until I can change it. Thanks!


Solution

  • You could install the TypedTicketWorkflowPlugin to restrict some transitions to specific ticket types only. Then update your [ticket-workflow] section along the lines of (untested):

    [ticket-workflow]
    assign = new,reopened -> assigned
    assign.operations = set_owner
    assign.permissions = TICKET_MODIFY
    assign.tickettype = defect, task
    
    approve = new,reopened -> approved
    approve.permissions = TICKET_ADMIN
    approve.tickettype = enhancement
    
    assign_enhancement = approved -> assigned
    assign_enhancement.name = assign
    assign_enhancement.operations = set_owner
    assign_enhancement.permissions = TICKET_MODIFY
    

    You may have to tweak your approve.permissions options to allow only the right people to approve enhancement requests. I'm not sure if you can set usernames directly in the option, though.