I need get user email address from jira project Role,Assignee,Watchers,ProjectRole. using java API.
I think this will be a two step process. First, get the User-Names from your sources using the relevant API calls like
https://docs.atlassian.com/software/jira/docs/api/REST/7.6.1/#api/2/issue-getIssue
https://docs.atlassian.com/software/jira/docs/api/REST/7.6.1/#api/2/issue-getIssueWatchers
https://docs.atlassian.com/software/jira/docs/api/REST/7.6.1/#api/2/role-getProjectRoleActorsForRole
Then using the usernames to get the email-address using https://docs.atlassian.com/software/jira/docs/api/REST/7.6.1/#api/2/user-getUser
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ah, sorry, my mistake.
For Assignee you need to get the Issue (https://docs.atlassian.com/software/jira/docs/api/7.12.0/com/atlassian/jira/issue/Issue.html), then you can get the Assigne with getAssignee, you can get the email-address the from the resulting ApplicationUser.
To get the Watchers, you can use the WatcherManager https://docs.atlassian.com/software/jira/docs/api/7.12.0/com/atlassian/jira/issue/watchers/WatcherManager.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
And for ProjectRole, please check the ProjectRoleManager https://docs.atlassian.com/software/jira/docs/api/7.12.0/com/atlassian/jira/security/roles/ProjectRoleManager.html, there you will get the project roles, the you can get the ProjectRoleActors and from there the Users.
For Groups, use GroupManager https://docs.atlassian.com/software/jira/docs/api/7.12.0/com/atlassian/jira/security/groups/GroupManager.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.