Add the above code under "Linked Issue" field for your project behavior .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
for both inbound and out-bound:
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.link.IssueLinkTypeManager
import com.onresolve.jira.groovy.user.FieldBehaviours
import com.onresolve.jira.groovy.user.FormField
import org.apache.log4j.Logger
import org.apache.log4j.Level
import groovy.transform.BaseScript
@BaseScript FieldBehaviours fieldBehaviours
def log = Logger.getLogger(getClass())
log.setLevel(Level.DEBUG)
FormField linkTypes = getFieldById("issuelinks-linktype")
def allowedOutwardTypes = ["Used by Application(s)"]
def allowedInwardTypes = ["Has Exception(s)"]
//Please make sure you have this option configured in issue linking globally.
IssueLinkTypeManager issueLinkTypeManager = ComponentAccessor.getComponent(IssueLinkTypeManager)
Map outwardAllowedLinks = issueLinkTypeManager.getIssueLinkTypes(false).findAll{ it.outward in allowedOutwardTypes }.collectEntries{
[it.outward,it.outward]
Map inwardAllowedLinks = issueLinkTypeManager.getIssueLinkTypes(false).findAll{ it.inward in allowedInwardTypes }.collectEntries{
[it.inward,it.inward]
}
def allowedLinks = outwardAllowedLinks << inwardAllowedLinks
log.debug("Allowed Links = $allowedLinks")
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I recommend the following plugin: https://marketplace.atlassian.com/apps/1214172/extended-schemes-for-jira?tab=overview&hosting=server
It's a life saver if you are trying to reduce the number of options for issue links and resolution options per project.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @Fabian Lim ,
As @Mahima Srivastav tagged this question as Cloud that might not work. I fear there is no cloud version of this app available.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @Mahima Srivastav ,
Unfortunately issue link types are configured globally.
There is however a suggestion available for it https://jira.atlassian.com/browse/JRACLOUD-36494
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.