I use the following code to clone an issue:
def params = [
(CloneIssue.FIELD_TARGET_PROJECT): "my project key",
(CloneIssue.FIELD_LINK_TYPE) : null,
......] as Map<String, Object>
def executionContext=[ issue : mySourceIssue ] as Map<String,Object>
def cloneIssueBean=ScriptRunnerImpl.scriptRunner.createBean(CloneIssue)
def updateContext = cloneIssueBean.execute(params, executionContext)
That will clone my issue with all the links including "cloners". My question: How do I indicate specific link type s through the param FIELD_LINK_TYPE since I don't want all the links to be cloned? I don't want to clone the "cloners" type. I tried to put in link type ids as Long, String, List and none of them works. I can't eliminate cloners type from being cloned. All links are cloned. If we can't indicate the link types, what's the purpose of that parameter? I assume I just don't know what the format/syntax of that field.
Thanks,