I am new writing add-ons/plugins for Jira.
Using Script Runner I can perform the following query that returns issues that where last updated by any user part of the Developer role.
issueFunction in lastUpdated("inRole Developers")
I would like to write a similar function that would return me issues where the assign is part of a specific role. Example:
issueFunction in Assignee("inRole Developers")
The documentation that I have found does not give examples on how to do this. Only a template is available.
Would you be able to provide some sample code or more comprehensive documentation on how to achieve this?
ComponentManager componentManager = ComponentManager.getInstance() ProjectRoleManager projectRoleManager = ComponentManager.getComponentInstanceOfType(ProjectRoleManager.class) as ProjectRoleManager ProjectRole devRole = projectRoleManager.getProjectRole("Developers") projectRoleManager.isUserInProjectRole(issue.assignee, devRole, issue.projectObject)
I would not call the function Assignee. You could do it your way but it would be slow as it requires retrieving each issue and calling your code on it.
It would be better, although harder, to write a query that ends up as the following query:
(project = X and assignee in (user1, user2, <all Developers of X>) || (project = Y and assignee in (user1, user2, <all Developers of Y>) || ... etc, for all visible projects
That looks complex but that will be fast to execute.
Hello! My name is Genevieve Blanch, and I'm the Marketing Manager at RefinedWiki, creators of apps to give teams the tools to customize Atlassian platforms. Currently, 44% of the tech team at Re...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs