user profile information using script runner

Noora Salman September 8, 2021

Using Adaptavist ScriptRunner for JIRA can I create a user profile or do I need add ons?

Information I would like to see in a profile are more details about the user.

2 answers

0 votes
Juan José Marchal Gómez
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 8, 2021

Hello @Noora Salman 

 

what means "more details"?

 

 

You can use:

 

import com.atlassian.jira.component.ComponentAccessor
def userManager = ComponentAccessor.getUserManager()
def user = userManager.getUserByName("xxx")

and you have details like, displayname...email... about the user inside the variable user

 

Best regards!

0 votes
Elifcan Cakmak
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 8, 2021

Hello

You can create users with scriptrunner using Jira API. Check out this documentation:

https://docs.atlassian.com/software/jira/docs/api/8.19.0/index.html?com/atlassian/jira/user/util/UserManager.html

Regards,

Elifcan

Suggest an answer

Log in or Sign up to answer