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

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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

Script no longer working after update

Getting an error with our script after upgrading Jira (see script below-error is here **)


import com.atlassian.jira.component.pico.ComponentManager

ComponentManager componentManager = ComponentManager.getInstance()
**ProjectRoleManager projectRoleManager = ComponentManager.getComponentInstanceOfType(ProjectRoleManager.class) as ProjectRoleManager**

def String user
def project = issue.getProjectObject()

ProjectRole role1 = projectRoleManager.getProjectRole("HR")
ProjectRoleActors actors = projectRoleManager.getProjectRoleActors(role1, project)
user = actors.getUsers().toList()?.first()?.name



I changed the ComponentManager but can't see to figure out the rest.

1 answer

1 accepted

0 votes
Answer accepted

Hi @yadeniji ,

please try to replace your code with this:

import com.atlassian.jira.component.ComponentAccessor

final String roleName = "HR"

ProjectRoleManager projectRoleManager = ComponentAccessor.getComponent(ProjectRoleManager)

def projectRole = projectRoleManager.getProjectRole(roleName)
def users = projectRoleManager.getProjectRoleActors(projectRole, issue.projectObject).applicationUsers

if (users) {


Thank you for your reply.  I replaced the code, but now we get this error when I look at the post function.


The following log information was produced by this execution. Use statements"...") to record logging information.

2020-01-14 15:09:44,961 ERROR [workflow.AbstractScriptWorkflowFunction]: *************************************************************************************
2020-01-14 15:09:44,962 ERROR [workflow.AbstractScriptWorkflowFunction]: Script function failed on issue: COSTAT-14080, actionId: 1, file: null
groovy.lang.MissingMethodException: No signature of method: static com.atlassian.jira.component.pico.ComponentManager.getComponentInstanceOfType() is applicable for argument types: (java.lang.Class) values: [interface]
Possible solutions: getComponentInstanceOfType(java.lang.Class), getOSGiComponentInstanceOfType(java.lang.Class)
Hana Kučerová Community Leader Jan 15, 2020

Hi @yadeniji ,

which version of Jira do you have now (i. e. after mentioned upgrade)?

We are running version 8.5.1 right now

Looks the errors stopped!

Suggest an answer

Log in or Sign up to answer

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