Forums

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

I want to create a hyper link for scripted field in jira cloud by using script runner

Ravina
Community Champion
October 17, 2022

I have scripted field  in Jira Server which store the value of Fix version Name (Text Field) in Release Issue field (Scripted Field) the code is as shown below

 

import com.atlassian.jira.issue.fields.CustomField;

import com.atlassian.jira.issue.CustomFieldManager;
import com.atlassian.jira.issue.Issue;

import com.atlassian.jira.component.ComponentAccessor;

CustomFieldManager customFieldManager = ComponentAccessor.getCustomFieldManager();
CustomField versionNameField = customFieldManager.getCustomFieldObjectByName("Fix Version Name");

String versionName = issue.getCustomFieldValue(versionNameField);

if (versionName != "N/A") {
return "<a href='https://jira-base url/issues/?jql=fixVersion=\"" + versionName + "\"''>Issues in this Release</a>";
}
return "";

 

When try to create the same field in Jira cloud I am not getting proper hyperlink result for the Release Issue scripted field.

Anyone know how to use the anchor tag in scripted field in Jira cloud.

0 answers

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events