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) 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 Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,209 views 13 19
Join discussion

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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot