Forums

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

How to copy Organizations to custom field

Berry Kersten
Contributor
September 29, 2020

Current situation:

ScriptRunner Post function 'Clones an issue, and links' used for cloning an issue from project X to project Y

Wish

Copy the field Organizations in JSD project X to custom field Reported Organization in project Y

Current implementation

The solution must be something like this

def cf = customFieldManager.getCustomFieldObjects(sourceIssue).find {it.name == 'Reported Organization'}
issue.setCustomFieldValue(sourceIssue.(Organizations)

However, I'm getting an error:

Script305.groovy: 4: unexpected token:  @ line 4, column 54.
   ue(sourceIssue.(Organizations)

Ideas anyone? Thanks.

1 answer

Suggest an answer

Log in or Sign up to answer
0 votes
twozniak
May 7, 2021

Hi @Sumant Renukarya 

Could You describe your case in which You want to automate merge check creation? ScriptRunner doesn't support any externally available REST API but maybe your case could be automated by  ScriptRunner plugin in other way, everything depends on the use case.

Kind Regards,

Tomasz Wozniak

Software Engineer - ScriptRunner for Bitbucket

TAGS
AUG Leaders

Atlassian Community Events