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

This widget could not be displayed.

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!!!

This widget could not be displayed.

{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
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

160 views 2 0
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