[ticket-workflow]
; original-workflow.ini

; <none>:
;   create: -> new, owner set to component default or "somebody"
;   assign to: -> assigned
;
; New:
;   leave as new
;   accept: -> assigned state, owner set to self, shows up as accepted.
;   resolve as:   -> closed, resolution_set
;   reassign to:
;
; Assigned:
;   leave as assigned
;   resolve as:
;   reassign to: -> new state, not accepted
;
; Closed:
;   leave as closed
;   reopen ticket -> reopened, resolution_del
;
; Reopened:
;   leave as reopened
;   resolve as:
;   reassign to: -> new, owner_set

; This is action-centric
leave = * -> *
leave.operations = leave_status
leave.default = 1

create = <none> -> new
create.default = 1

create_and_assign = <none> -> assigned
create_and_assign.label = assign
create_and_assign.permissions = TICKET_MODIFY
create_and_assign.operations = may_set_owner

accept = new -> assigned
accept.permissions = TICKET_MODIFY
accept.operations = set_owner_to_self

resolve = new,assigned,reopened -> closed
resolve.permissions = TICKET_MODIFY
resolve.operations = set_resolution

reassign = new,assigned,reopened -> new
reassign.permissions = TICKET_MODIFY
reassign.operations = set_owner

reopen = closed -> reopened
reopen.permissions = TICKET_CREATE
reopen.operations = del_resolution
