Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Scriptrunner Cloud get clone Source issue

Constance Hua (Private) October 23, 2018

Hello, 

My cloning post-function doesn't clone the reporter. I need to get the source issue reporter and input it in the target issue. 

So far I found how to input but not how to get source issue:

def response = get('').asObject(Map)
assert response.status == 200
def username= response.body.name
issueInput.fields.reporter = [name: username] as Map

 

1 answer

1 accepted

0 votes
Answer accepted
Constance Hua (Private) October 23, 2018

All good I found out that this was working:

def reporter = issue.fields.reporter.name
issueInput.fields.reporter = [name: reporter]

And that I also missed adding the reporter field in the create issue screen..! 

Suggest an answer

Log in or Sign up to answer