Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to fetch user information

Hi I would Like to fetch the email ID or their user name of the user who reports the issue 

How can I do it

2 answers

Hi @Pradeep A

Could you provide a little bit more information, i.e. which approach do you intend to use to get the Reporter's email address? Is it Post-Function, Listener or Script Console? 

If you intend to get a reporter's email address, you can even use the Script Console to do this.

Below is an example code for your reference:-

import com.atlassian.jira.component.ComponentAccessor

def issueManager = ComponentAccessor.issueManager
def issue = issueManager.getIssueByCurrentKey("SFFM-1")
def reporter = issue.reporter
log.warn "${reporter.emailAddress}"

Below is a print screen of the Script Console output:-

reporter_email.png

Thank you and Kind Regards,
Ram

For example, If you are using Azure AD, you have to define some additional information to be sent as (organization, department etc.)

 

Further information at: https://support.atlassian.com/provisioning-users/docs/understand-user-provisioning/

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Atlassian Access

Resources + Q&A from "What's new in Atlassian Access" webinar

Hi Community! Thank you to all those who joined our What’s new in Atlassian Access webinar last week! We received so many great questions about existing functionality and newly released features of...

1,098 views 2 9
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you