Need to fetch email ids of all the leads of Jira project either using a mysql query or java

Rohan Kulkarni March 6, 2014

Need to fetch email ids of all the leads of Jira project either using a mysql query or java

1 answer

0 votes
Henning Tietgens
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.
March 6, 2014

Using Script Runner plugin it's the following script:

import com.atlassian.jira.component.ComponentAccessor

def projectManager = ComponentAccessor.projectManager
def userUtil = ComponentAccessor.userUtil

String emails = ""

projectManager.getProjectObjects().each { p ->
    emails += userUtil.getUserByKey(p.leadUserKey)?.emailAddress + "\n"
}
return emails

Suggest an answer

Log in or Sign up to answer