I have a field the shows the parent issue key for any issue. I would like to make this field hyperlinked so that, when clicked it opens the parent issue. Here is my current code:
import com.atlassian.jira.issue.Issue;
Issue parentIssue = issue.getParentObject();
def parentIssueKey, issueKey;
if (parentIssue != null) {
parentIssueKey = parentIssue.getKey();
return parentIssueKey;
}
else {
issueKey = issue.getKey();
return issueKey;
}
Hi Krishnanand,
Here's how you do it:
1) Make sure your scripted field is using HTML template
2) Make your code return something like this:
return "<a href = \"\">${issueKey}</a>".toString()
Thanks it helped convert into an hyperlink, but the link when clicked just shows "
I know, there is something obvious that I am missing here.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It works for me just fine. Can you show us your code?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry, my mistake, posted the wrong code, doh!
It should be like this:
return "<a href = \"https://yourjira.com/browse/${issue.getKey()}\">${issue.getKey()}</a>".toString()
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is what is was missing ... thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.