Clone an issue and assign to the reporter

I have a post function CloneIssue.groovy that kicks off when a certain value is present. This creates a ticket in a different project. What I need to do is make the assignee in the new ticket the reporter.

For the 'Additional issue actions', I put

issue.assigneeId = issue.reporterId

this does not work as it makes the assignee Unassigned.

I verified that the reported is there. I've made the assignee a cfValue field before, but the reporter is NOT a custom field.

4 answers

Why don't you update the workflow in the different project by adding a post function and use the "Assign to Reporter" option?

in the create step...

If someone creates this tickets manually, I don't want it to assign to reporter.

Hi Kevin,

Setting the reporter works a bit different than setting the custom fields, therefore you might be unsuccessful in your efforts. Can you try to set the reporter with the following line in the "Additional issue actions" textbox:


To get a better insight, this script is using the InputParameters for creating a new issue, which has some basic JavaDoc here:


I want to reference the value of reporter and assign to another field. I just need to command(s) that will pull the current reporter (during this clone process).

Yes. You can handle that by adding a custom event and fire that up in Project 1 as a post function and add this event as a condition in Project 2 workflow.

Hi Kevin,

if I understand you correctly, you want to clone ticket A to ticket B and set the assignee of ticket B to the reporter of ticket A?

You can get the value of the current reporter, i.e. the reporter of ticket A by using:


(The question mark will protect you against a NullPointerException)

To set the assignee in ticket B, you can make use of the issueInputParameters:

issueInputParameters.setAssigneeId("John Doe")

So if you want to set the assignee of ticket B to the reporter of ticket A, you enter the following line:


Hope this solves your problem!


The transition fails and I get the following in the catalina log

/secure/CommentAssignIssue.jspa [onresolve.jira.groovy.GroovyFunctionPlugin] Error executing post-function
javax.script.ScriptException: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: issueInputParameters for class: Script9


Do you have an insight into the error I am seeing by using?


Suggest an answer

Log in or Sign up to answer
Community showcase
Published Feb 07, 2019 in Marketplace Apps

A Timeless Love Story

It started as any story starts, on a normal, rainy day.   Admin meets App, and her name was Klok2, and like any first relationship we were both trying to make it work but neither one knew what...

431 views 8 26
Read article

Atlassian User Groups

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!

Find my local user group

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

Groups near you