[ticket-workflow]
; opensource-workflow.ini

; create action
create = <none> -> new

; accept action
; When you accept a ticket, you get ownership of it.  (You can't accept a
; ticket on someone else's behalf.)
accept = new,assigned,accepted,started -> accepted
accept.operations = set_owner_to_self
accept.permissions = TICKET_MODIFY

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

reassign = assigned,accepted,started -> assigned
reassign.operations = set_owner
reassign.permissions = TICKET_MODIFY

; Allow correcting the ownership of a closed ticket.
change_owner = closed -> closed
change_owner.label = change ownership
change_owner.operations = set_owner
change_owner.permissions = TICKET_MODIFY

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

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

; resolve actions
resolve = new,assigned,accepted,started -> closed
resolve.operations = set_resolution
resolve.permissions = TICKET_MODIFY

; start/stop actions
start = accepted,assigned -> started
start.operations = set_owner_to_self
start.permissions = TICKET_MODIFY

stop = started -> 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,accepted,started -> 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
