there ist no solution from Atlassian, so here ist my Tip for Jira DataCenter
you can write a ScriptRunner Programm, wich uses the HttpSession and the Request Data
I have tested this in Chrome and Edge
(i wrote this in a helper Class so it is a static mehtod. After you have the "real" user (not the automation actor) you can do your work for example write a comment with the
ComponentAccessor.getCommentManager()
Here is the code
public static String getActualuser()
{
def request = ComponentAccessor.getComponent(HttpContext)?.getRequest()
if (request) {
HttpSession httpSession = request.getSession()
def userid= httpSession.getAttribute('seraph_defaultauthenticator_user_id')
return(userid )
} else {
return(null)
}
}