Give first-time users a message box.

Timothy McClain July 6, 2022

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.

1 answer

0 votes
Bastian Stehmann
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 6, 2022

Hi,

 

Although I can't help with your Scriptrunner questions, maybe this app might help you. It allows you to create a pop up message that only shows once.

https://marketplace.atlassian.com/apps/1218962/gdpr-dsgvo-and-security-for-jira?hosting=cloud&tab=overview

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events