[ticket-workflow]
; enterprise-workflow.ini

; 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.name = 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
requestinfo = assigned,in_work,in_QA -> infoneeded
requestinfo.name = request info
requestinfo.permissions = TICKET_MODIFY

provideinfo = infoneeded -> assigned
provideinfo.name = provide info
provideinfo.permissions = TICKET_MODIFY
provideinfo.default = 2

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

provideinfo_new = infoneeded_new -> new
provideinfo_new.name = provide info
provideinfo_new.permissions = TICKET_MODIFY
provideinfo_new.default = 2

