custom email body using script runner

Mohamed El Taweel June 3, 2019

 

In order to generate an XSRFToken will use the following script

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.security.xsrf.SimpleXsrfTokenGenerator

def XSRFToken = ComponentAccessor.getComponent(SimpleXsrfTokenGenerator).generateToken()

 

In the email body will use that token in the URL. So that url will be something like

def actionLink = "${baseUrl}/secure/WorkflowUIDispatcher.jspa?id=${issueId}&action=${action.id}&atl_token=${XSRFToken}"
 "<a class='aui-button' href='${actionLink}'>${action.name}</a>"

 

where I will write the script which generates the XSRFToken and how I will pass the XSRFToken to the email body?

 

 

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events