Load ticket details when user enters the "epic link" in Jira administrator

Tharindu Randipa June 14, 2023

Hi everyone.

I want to know how to load ticket details when user enters the "epic link" in a story issue type in Jira administrator using ScriptRunner plugin. 

1 answer

1 accepted

0 votes
Answer accepted
Vikrant Yadav
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 14, 2023

Hi @Tharindu Randipa Using Scriptrunner behaviour you can fill tickets details when user enters Epic Link field value. 

Tharindu Randipa June 15, 2023

Thank you @Vikrant Yadav 

Do I need to write groovy script for that?

Vikrant Yadav
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 16, 2023

@Tharindu Randipa Yes, for this you need to add Server side script for Epic Link field in Behaviour. 

Sample Script :- 

import com.onresolve.jira.groovy.user.FieldBehaviours
import groovy.transform.BaseScript
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.Issue
import com.atlassian.jira.issue.IssueManager

@BaseScript FieldBehaviours behaviours
def epicLink = getFieldById(fieldChanged)
def epicLinkValue = epicLink.value as String

def summary = getFieldById("summary")

if (epicLinkValue) {
if (epicLinkValue.split(':').last() == 'VTPC-20') {
      summary.setFormValue("Default Value")
}
}

Suggest an answer

Log in or Sign up to answer