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

Need help with post functions in JIRA cloud

Hi All,

We are migrating from JIRA server to JIRA cloud. We have some custom groovy script which are executed as post functions, those scripts will not run in JIRA cloud.

I have tried using the REST API to change the assignee ID. But I am unable to change it.

Below is the rest API code:

def result = put("/rest/api/2/issue/${issueKey}")
.header('Content-Type', 'application/json')
fields: [
assignee : [
displayName: 'anusha'

Its just setting the assignee ID to Unassigned.

I am also facing trouble with importing some of the classes required to run a groovy script.


import com.atlassian.jira.component.ComponentAccessor

Gives an error: unable to resolve.

Needed some guidance on how to proceed here. We have many groovy scripts which have to be migrated.

1 answer

1 accepted

0 votes
Answer accepted
Veera Atlassian Team Feb 06, 2020



In Jira Cloud, it's not possible to assign the tissue using user name. You need to use accountId of the user. Please refer the below REST API doc.

When you export users into CSV file from your Cloud site, it'll have accountId for all the users.

Thank you. Will try this out.

Can you also suggest me on how to convert some of the complex groovy script from Jira Server to JIRA cloud.

Thank you. Using account ID helped in changing the assignee.

Like Veera likes this

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