MISC Custom Fields: Calculated text field

Hi! I'm using JIRA 6.2.5

 

I'm trying to use formula, that makes url:

<!-- @@Formula: "http://mysite.ru/packet/view/" + issue.get("customfield_11019")
-->

but i've got 2 problems

1) url is not active (cant tap on it)

2) if customfield 11019 is empty - i get this http://mysite.ru/packet/view/null (i dont need any value if empty)

what i'm doing wrong?

2 answers

1 accepted

1 vote
Accepted answer

1) you might try to return a valid html link (<a href=...)

2) you need to test your custom field value against null and return null then:

if (issue.get("customfield_11019") == null) return null;

 

1) i dont know where to put it in formula(( 2) works! thanks!!!

{code}return "<a href=\"http://..."+issue.get(...)+"\">see details</a>"{code}

not working. maybe i'm doing it wrong

O!!! I got it!!! thanks!!!!! works Great!!

Can you share where you placed this in your formula?

Actually your entire formula would be very helpful.

Help - trying the same thing.

THIS WORKS:


<!-- @@Formula:
return "https://collaborate.mysite.com/display/EETSTSS/"+issue.get("customfield_14729");
-->

but, of course, is displayed as text and not a linkable URL

THIS DOESN'T WORK:

<!-- @@Formula:
return "<a href='https://collaborate.mysite.com/display/EETSTSS/"+issue.get(customfield_14729)+"'>Link here</a>";
-->

Nothing is displayed. (I tried \" characters instead of ' too).

I must be blind.... what am I doing wrong?

Your formulas are not visible. You need to use code blocks (last icon to the right) to paste your snippets.

Hi, I'm having the same problem as Tim Thompson, does someone has the solution?

Actually, this will not be possible until https://innovalog.atlassian.net/browse/JMCF-209 is resolved (in the upcoming JMCF 2.0). This is a limitation of Jira.

It works!
My formula:

<!-- @@Formula:
return "<a href=\"https://..." + issue.get("issuekey") +"..."+"\">see details</a>"
-->

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Wednesday in Jira

Make your Atlassian Cloud products more secure: our NEW admin security guide

Hey admins! I’m Dave, Principal Product Manager here at Atlassian working on our cloud platform and security products. Cloud security is a moving target. As you adopt more products, employees consta...

155 views 0 6
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you