Forums

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

Issue with set Link type on the create issue transition Behaviours

Moses Thomas
Community Champion
February 24, 2021

Hello Adaptavist,

 

I  having a wired situation here with linking (inwardLinks). I get the error 

We can't create this issue for you right now, it could be due to unsupported content you've entered into one or more of the issue fields. If this situation persists, contact your administrator as they'll be able to access more specific information in the log file.

I check the logFiles too and there is no useful info.

When i change the linkType to outwardlinks its  working fine! is this some kind of bug ?

Can some one  please assist ?  Script runner version 5.8.0-p5

import com.atlassian.jira.component.ComponentAccessor
//import org.apache.commons.lang3.StringUtils
//import com.onresolve.jira.groovy.user.FormField

final issuePickerFieldName = "VersionSnap"
def issuePickerField = getFieldByName(issuePickerFieldName)
def issuePickerFieldValue = issuePickerField.value




if (!issuePickerFieldValue) {
return
}

def relatedIssue = ComponentAccessor.issueManager.getIssueByCurrentKey(issuePickerFieldValue as String)

if (relatedIssue != null)
{
getFieldById('issuelinks-linktype').setFormValue('has parent').setReadOnly(true)
getFieldById('issuelinks-issues').setFormValue(relatedIssue.key).setReadOnly(true)

}

else{
getFieldById('issuelinks-linktype').setFormValue('has parent').setReadOnly(true)
getFieldById('issuelinks-issues').setFormValue(relatedIssue.key).setReadOnly(true)

}


  

 Kind regards,

Moses

1 answer

1 accepted

0 votes
Answer accepted
Moses Thomas
Community Champion
February 25, 2021

So tried it in DEV environment -  Script runner Version  6.16.0  it is  working perfect !   interesting !

Suggest an answer

Log in or Sign up to answer