Our dev team is tired of copying data from a parent item to a sub-task every time they create one. I have introduced a new transiton that creates the subtask and copies a set of data elements in the process. This works well but, of course, the transiton button appears in the available transition list. The team would like this transition to appear in the More actions dropdown - specifically, it should replace the normal Create sub-task option in the operations-subtask area.
I have added a scriptrunner fragment that removes the native create sub-task option and a second one to introduce the new option. This custom web item fragment has a "Do What" option of "Navigate to Link". The Link is set to
/secure/WorkflowUIDispatcher.jspa?id=${issue.id}&action=901
where 901 is the new transition that I'd like run.
This all works well with the exception of a missing XSRF security token error. If i append &atl_token=mysecuritytoken into the link, the operation works perfectly.
Is there any option to append the user's token in the above link string?