Hey,
I'm writing a mail handler script using scriptrunner and I need to have the ability of finding the relevant project key by user email. Is that possible?
For example:
Getting the project key which the user(test@test.com) belongs to.
Thanks in advance!
Hi,
I'm not a developer but i think you can do it like that.
Try to get the user using this class:
https://docs.atlassian.com/software/jira/docs/api/7.1.8/com/atlassian/jira/user/UserUtils.html
Then you can use this class
You may need to use this method for each project role and project in your instance.
getProjectRoleActors(ProjectRole projectRole, Project project)
There is maybe a better or quicker solution, i let people who have more knowledge in scriptrunner/groovy give some hint if you need.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.