[ticket-workflow]
; enterprise-workflow.ini

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

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

; assign, reassign, unassign actions
assign = new -> assigned
assign.operations = set_owner
assign.permissions = TICKET_MODIFY

reassign = assigned,in_work -> assigned
reassign.operations = set_owner
reassign.permissions = TICKET_MODIFY

reassign_closed = closed -> closed
reassign_closed.label = reassign
reassign_closed.operations = set_owner
reassign_closed.permissions = TICKET_MODIFY

unassign = assigned,in_work -> new
unassign.operations = del_owner
unassign.permissions = TICKET_MODIFY

; leave actions
leave = * -> *
leave.operations = leave_status
leave.default = 1

; test actions
test = new,assigned,in_work -> in_QA
test.permissions = TICKET_MODIFY

; resolve actions
resolve = in_QA -> closed
resolve.operations = set_resolution
resolve.permissions = TICKET_MODIFY

fail = in_QA -> assigned
fail.permissions = TICKET_MODIFY

; start/stop actions
start = assigned -> in_work
start.operations = set_owner_to_self
start.permissions = TICKET_MODIFY

stop = in_work -> assigned
stop.permissions = TICKET_MODIFY

; reopen actions
reopen = closed -> new
reopen.operations = del_resolution
reopen.permissions = TICKET_CREATE

; request info actions
; For tickets with an owner, they go back to assigned
request_info = assigned,in_work,in_QA -> infoneeded
request_info.permissions = TICKET_MODIFY

provide_info = infoneeded -> assigned
provide_info.permissions = TICKET_MODIFY
provide_info.default = 2

; But tickets without an owner go back to new.
request_info_new = new -> infoneeded_new
request_info_new.label = request info
request_info_new.permissions = TICKET_MODIFY

provide_info_new = infoneeded_new -> new
provide_info_new.label = provide info
provide_info_new.permissions = TICKET_MODIFY
provide_info_new.default = 2

