Forums

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

{{issue.key}} link instead of full link {{issue.url}}

Alexander February 17, 2021

Hi everyone!
I made an automation rule and seem to have set everything up, but displays the full address of the link. How to make it output but only as a {{key}} link.

2 answers

0 votes
John Funk
Community Champion
February 17, 2021

Hi Alexander  - Maybe try this:

<a href="{{issue.toUrl}}">{{issue.customfield_10119}}</a>

Alexander February 17, 2021

Hi @John Funk ,

Not. throws an error: Not a valid URL (customfield_10119) for a URl field.


And for "Text Field (single line)" returns: <a href="https://xxxxx .atlassian.net/browse/ID-126"> ID-126 </a>, no link
test parent link.jpg

John Funk
Community Champion
February 17, 2021

What is the value in that field?

Alexander February 17, 2021

in what field?

John Funk
Community Champion
February 17, 2021

In your custom field that you want used through Automation

Alexander February 17, 2021

If I use smart valie {{issue.url}} for a custom field type url, I get the following:

test parent link.jpg


And I just need to display ID-126, as a link to the linked task.

John Funk
Community Champion
February 17, 2021

What is the actual value stored in the field?

0 votes
Alexis Robert
Community Champion
February 17, 2021

Hi @Alexander , 

 

I think using this simple HTML code should do what you want : 

 

<a href="{{toUrl}}">{{key}}</a>

 

Let me know if this helps, 

 

--Alexis

Alexander February 17, 2021

Hi @Alexis Robert ,

Thanks for the answer.
This doesn't work for Url Field:
throws an error: Not a valid URL (customfield_10119)

And if I try to output to: Text Field (single line).

returns: <a href="https://xxxxx .atlassian.net/browse/ID-126"> ID-126 </a>, no link

Alexis Robert
Community Champion
February 17, 2021

I though you needed this for an email notification, if it's a custom field then can you please let me know what type it is ? 

Alexander February 17, 2021

as mentioned above, I tried to output to two different types of fields:
1. Url Field
2. Text Field (single line)
Custom fields .jpg

Suggest an answer

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

Atlassian Community Events