Forums

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

Customize "linked issues" options as a project configuration

Yen Pham
Contributor
November 11, 2019

Currently the "linked issues" field is global and it's getting bloated for our org with 20+ options

As an admin, I'd like to to customize the options available in the "linked issues" field per project so that my users aren't overwhelmed with the 20+ options

2 answers

2 votes
Avinash Bhagawati {Appfire}
Community Champion
November 11, 2019

Hi @Yen Pham ,

With default configuration it is not possible to configure link types for individual project. If you are using linked issues fields in transition screens, you can use Behaviours from Script runner for Jira to display linked issue type values according to selected value of resolution.

Please refer below sample script for the same.

import com.atlassian.jira.issue.resolution.Resolution

def resolutionField = getFieldById("resolution")
def issueLinkType = getFieldById("issuelinks-linktype")
def issueLinkIssue = getFieldById("issuelinks-issues")


def resolution = resolutionField.getValue() as Resolution

if (resolution.name == "Duplicates") {
    issueLinkType.setHidden(false)
    issueLinkType.setRequired(true)
    getFieldById("issuelinks-linktype").setFormValue("Duplicates to") 
    getFieldById('issuelinks-linktype').setReadOnly(true)
    issueLinkIssue.setRequired(true)

       
} else {
    issueLinkType.setRequired(false)
    issueLinkType.setHidden(true)
}

Thanks,

Avinash 

1 vote
Ollie Guan
Community Champion
November 11, 2019

Hi @Yen Pham ,

You can refer to the following post.

Link types differentiation by projects

Suggest an answer

Log in or Sign up to answer