I am trying to guide new users to the Altassian tutorials for beginners when they login for the first time. I am aware there is a plugin put out by Atlassian, however I cannot utilize it due to network limitations (it needs to reach out to external IP addresses).
I was trying to utilize Scriptrunner to this end as there is a LoginEvent for a listener to pick up. Here is the code I have, it is currently set to trigger at every logon for testing purposes.
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.security.login.LoginManager
import com.atlassian.jira.event.user.LoginEvent
import com.onresolve.scriptrunner.runner.util.UserMessageUtil
def userManager = ComponentAccessor.getUserManager()
def loginManager = ComponentAccessor.getComponent(LoginManager)
def loginEvent = event as LoginEvent
def user = loginEvent.getUser()
def data = loginManager.getLoginInfo(user.getName())
def lastLogin = data.getLastLoginTime()
def loginCount = data.getLoginCount()
if(loginEvent)
UserMessageUtil.info('Welcome to Jira!\nFor new users, we recommend you checkout this brief tutorial on Jira.')
return "Complete"
However, while the listener does pick up and run on a login, no message box is shown. Is there any documentation on UserMessageUtil for its functionality or limitations? I haven't found end.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.